mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Thomas Gleixner' <tglx@linutronix.de>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Easwar Hariharan <eahariha@linux.microsoft.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"Anna-Maria Behnsen" <anna-maria@linutronix.de>,
	Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Michael Kelley <mhklinux@outlook.com>
Subject: RE: [PATCH v2 1/2] jiffies: Define secs_to_jiffies()
Date: Wed, 6 Nov 2024 22:19:55 +0000	[thread overview]
Message-ID: <6acb24504a454638848dd9adff7cb5dc@AcuMS.aculab.com> (raw)
In-Reply-To: <87ed3y255a.ffs@tglx>

From: Thomas Gleixner
> Sent: 29 October 2024 17:25
> 
> On Tue, Oct 29 2024 at 17:22, Geert Uytterhoeven wrote:
> > On Tue, Oct 29, 2024 at 5:08 PM Thomas Gleixner <tglx@linutronix.de> 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.

I was wondering if it really had any purpose at all.
It just obfuscates code, doesn't even make it smaller.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

  parent reply	other threads:[~2024-11-06 22:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 19:11 [PATCH v2 0/2] Converge on secs_to_jiffies() Easwar Hariharan
2024-10-28 19:11 ` [PATCH v2 1/2] jiffies: Define secs_to_jiffies() Easwar Hariharan
2024-10-28 19:25   ` Luiz Augusto von Dentz
2024-10-29 16:08   ` Thomas Gleixner
2024-10-29 16:22     ` Geert Uytterhoeven
2024-10-29 17:25       ` Thomas Gleixner
2024-10-29 21:35         ` Easwar Hariharan
2024-11-06 22:19         ` David Laight [this message]
2024-11-06 23:55           ` Thomas Gleixner
2024-10-28 19:11 ` [PATCH v2 2/2] drivers: hv: Convert open-coded timeouts to secs_to_jiffies() Easwar Hariharan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6acb24504a454638848dd9adff7cb5dc@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=anna-maria@linutronix.de \
    --cc=decui@microsoft.com \
    --cc=eahariha@linux.microsoft.com \
    --cc=geert@linux-m68k.org \
    --cc=haiyangz@microsoft.com \
    --cc=johan.hedberg@gmail.com \
    --cc=kys@microsoft.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=mhklinux@outlook.com \
    --cc=tglx@linutronix.de \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®