[lkml]   [2017]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectcheckpatch: Question regarding asmlinkage and storage class
Dear checkpatch developers,

The coreboot project started using, and now some effort
is going into fixing issues pointed out by ``.

The file `src/arch/x86/acpi_s3.c` in coreboot contains the code below.

   205 void (*acpi_do_wakeup)(uintptr_t vector, u32 backup_source, u32 backup_target,
   206 u32 backup_size) asmlinkage = (void *)WAKEUP_BASE;

The warning is

> WARNING: storage class should be at the beginning of the declaration

which raised the question below [2].

> And I am waiting for someone to answer why claims
> asmlinkage as a storage-class in the first place.

In coreboot the macro is defined similarly to Linux.

#define asmlinkage __attribute__((regparm(0)))
#define alwaysinline inline __attribute__((always_inline))

In Linux, commit 9c0ca6f9 (update to version 0.10) seems
to have introduced the check. The commit message contains “asmlinkage
is also a storage type”.

Furthermore, `` doesn’t seem to warn about the code below.

void __attribute__((weak)) mainboard_suspend_resume(void)

This raises the question below.

> It appears coreboot proper mostly followed this placement for
> function attributes before. It would be nice if we were consistent,
> specially if checkpatch starts to complaint about these.

Is there another reason, besides not having that implemented?

I am looking forward to your answers.

Kind regards,


[3][unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2017-03-18 13:16    [W:0.053 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site