Re: [PATCH v2 1/2] jiffies: Define secs_to_jiffies()

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

 



On Tue, Oct 29 2024 at 17:22, Geert Uytterhoeven wrote:
> On Tue, Oct 29, 2024 at 5:08 PM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>> On Mon, Oct 28 2024 at 19:11, Easwar Hariharan wrote:
>> > diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
>> > index 1220f0fbe5bf..e5256bb5f851 100644
>> > --- a/include/linux/jiffies.h
>> > +++ b/include/linux/jiffies.h
>> > @@ -526,6 +526,8 @@ static __always_inline unsigned long msecs_to_jiffies(const unsigned int m)
>> >       }
>> >  }
>> >
>> > +#define secs_to_jiffies(_secs) ((_secs) * HZ)
>>
>> Can you please make that a static inline, as there is no need for macro
>> magic like in the other conversions, and add a kernel doc comment which
>> documents this?
>
> Note that a static inline means it cannot be used in e.g. struct initializers,
> which are substantial users of  "<value> * HZ".

Bah. That wants to be mentioned in the change log then.

Still the macro should be documented.

Thanks,

        tglx





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux