Linux kernel staging patches
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
Cc: linux-staging@lists.linux.dev
Subject: Re: [QUESTION] staging: When should static functions be marked inline?
Date: Mon, 30 Nov 2026 12:05:45 +0300	[thread overview]
Message-ID: <aw08aeXUSBKISfXL@stanley.mountain> (raw)
In-Reply-To: <CAGLmz9+QiQFugmn86ALnB5p9astDpQQp2xEENaOwGDZh8-Uu5g@mail.gmail.com>

Generally static is enough.  The compiler often ignores the inline anyway
and decides on its own what to do.  Use __always_inline if A) the
compiler gets it wrong really and B) benchmarking shows that it needs to
be inlined.

This mostly affects new code.  With old code, just leave it as-is unless
there is a bug.  Removing the inline doesn't really make the code more
readable so it's not worth the churn.

regards,
dan carpenter


      reply	other threads:[~2026-11-30  9:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  8:28 [QUESTION] staging: When should static functions be marked inline? Himanshu Bakshi
2026-11-30  9:05 ` Dan Carpenter [this message]

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=aw08aeXUSBKISfXL@stanley.mountain \
    --to=error27@gmail.com \
    --cc=himanshu.bakshi478@gmail.com \
    --cc=linux-staging@lists.linux.dev \
    /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