Re: __assign_str handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johannes,

I am unsure here, but I looked at Steven's commit removing it:
2c92ca849fcc6ee7d0c358e9959abc9f58661aea

I was wondering if a variadic macro makes sense:
https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html

I don't know much about how they are used in kernel and searched the kernel's
src and came across your commit here:
568db7fd27fad183d186742dc7ae6ca211ba51ff

You introduced the IWL_FW_CHECK macro for the iwlwifi driver which seems to
handle additional logging parameters well.

Could we modify __assign_str to handle variadic inputs?

For example:

  #define __assign_str(dst, ...) __assign_str_helper(dst, ##__VA_ARGS__)

The helper function could resolve the assignment based on the count/context of
the arguments.

Fwiw, I am still familiarizing myself with kernel conventions and
backport-related modifications so perhaps this is a no-go.

Figured I'd share my thoughts since I have been running `gentree.py` again...

-- 
regards,
brian witte




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux