Skip to content

Commit 902a926

Browse files
ceolinfabiobaltieri
authored andcommitted
sw_isr_table: Remove unused macro parameter
irq is not used by _Z_ISR_TABLE_ENTRY and _Z_ISR_DIRECT_TABLE_ENTRY. Just remove it. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 8cc8006 commit 902a926

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

include/zephyr/sw_isr_table.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ struct z_shared_isr_table_entry z_shared_sw_isr_table[];
208208
/* Separated macro to create ISR table entry only.
209209
* Used by Z_ISR_DECLARE and ISR tables generation script.
210210
*/
211-
#define _Z_ISR_TABLE_ENTRY(irq, func, param, sect) \
211+
#define _Z_ISR_TABLE_ENTRY(func, param, sect) \
212212
static Z_DECL_ALIGN(struct _isr_table_entry) \
213213
__attribute__((section(sect))) \
214214
__used _MK_ISR_ELEMENT_NAME(func, __COUNTER__) = { \
@@ -220,7 +220,7 @@ struct z_shared_isr_table_entry z_shared_sw_isr_table[];
220220
_Z_ISR_DECLARE_C(irq, flags, func, param, counter)
221221

222222
#define _Z_ISR_DECLARE_C(irq, flags, func, param, counter) \
223-
_Z_ISR_TABLE_ENTRY(irq, func, param, _MK_ISR_ELEMENT_SECTION(counter)); \
223+
_Z_ISR_TABLE_ENTRY(func, param, _MK_ISR_ELEMENT_SECTION(counter)); \
224224
static Z_DECL_ALIGN(struct _isr_list_sname) Z_GENERIC_SECTION(.intList) __used \
225225
_MK_ISR_NAME(func, counter) = {irq, flags, {_MK_ISR_ELEMENT_SECTION(counter)}}
226226

@@ -237,7 +237,7 @@ struct z_shared_isr_table_entry z_shared_sw_isr_table[];
237237
/* Separated macro to create ISR Direct table entry only.
238238
* Used by Z_ISR_DECLARE_DIRECT and ISR tables generation script.
239239
*/
240-
#define _Z_ISR_DIRECT_TABLE_ENTRY(irq, func, sect) \
240+
#define _Z_ISR_DIRECT_TABLE_ENTRY(func, sect) \
241241
COND_CODE_1(CONFIG_IRQ_VECTOR_TABLE_JUMP_BY_ADDRESS, ( \
242242
static Z_DECL_ALIGN(uintptr_t) \
243243
__attribute__((section(sect))) \
@@ -255,7 +255,7 @@ struct z_shared_isr_table_entry z_shared_sw_isr_table[];
255255
_Z_ISR_DECLARE_DIRECT_C(irq, flags, func, counter)
256256

257257
#define _Z_ISR_DECLARE_DIRECT_C(irq, flags, func, counter) \
258-
_Z_ISR_DIRECT_TABLE_ENTRY(irq, func, _MK_IRQ_ELEMENT_SECTION(counter)); \
258+
_Z_ISR_DIRECT_TABLE_ENTRY(func, _MK_IRQ_ELEMENT_SECTION(counter)); \
259259
static Z_DECL_ALIGN(struct _isr_list_sname) Z_GENERIC_SECTION(.intList) \
260260
__used _MK_ISR_NAME(func, counter) = { \
261261
irq, \

scripts/build/gen_isr_tables_parser_local.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,23 +237,20 @@ def __shared_client_num_section(irq):
237237
return '.isr_shared.0x{:x}_client_num'.format(irq)
238238

239239
def __isr_spurious_entry(self, irq):
240-
return '_Z_ISR_TABLE_ENTRY({irq}, {func}, NULL, "{sect}");'.format(
241-
irq = irq,
240+
return '_Z_ISR_TABLE_ENTRY({func}, NULL, "{sect}");'.format(
242241
func = self.__config.swt_spurious_handler,
243242
sect = self.__isr_generated_section(irq)
244243
)
245244

246245
def __isr_shared_entry(self, irq):
247-
return '_Z_ISR_TABLE_ENTRY({irq}, {func}, {arg}, "{sect}");'.format(
248-
irq = irq,
246+
return '_Z_ISR_TABLE_ENTRY({func}, {arg}, "{sect}");'.format(
249247
arg = '&{}[{}]'.format(self.__config.shared_array_name, irq),
250248
func = self.__config.swt_shared_handler,
251249
sect = self.__isr_generated_section(irq)
252250
)
253251

254252
def __irq_spurious_entry(self, irq):
255-
return '_Z_ISR_DIRECT_TABLE_ENTRY({irq}, {func}, "{sect}");'.format(
256-
irq = irq,
253+
return '_Z_ISR_DIRECT_TABLE_ENTRY({func}, "{sect}");'.format(
257254
func = self.__config.vt_default_handler,
258255
sect = self.__irq_spurious_section(irq)
259256
)

0 commit comments

Comments
 (0)