linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Martin Kaiser <martin@kaiser.cx>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Michael Straube <straube.linux@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 6/6] staging: r8188eu: remove local BIT macro
Date: Wed, 16 Mar 2022 12:27:44 +0300	[thread overview]
Message-ID: <20220316092743.GD1841@kadam> (raw)
In-Reply-To: <20220316090128.GT3293@kadam>

On Wed, Mar 16, 2022 at 12:01:28PM +0300, Dan Carpenter wrote:
> On Tue, Mar 15, 2022 at 09:50:41PM +0100, Martin Kaiser wrote:
> > The r8188eu driver defines a local BIT(x) macro. Remove this local macro
> > and use the one from include/linux/bits.h.
> > 
> > The global BIT macro returns an unsigned long value. Therefore, we have to
> > cast DYNAMIC_BB_DYNAMIC_TXPWR to u32 explicitly. This define is used with
> > the bitwise not operator.
> 
> It doesn't change run time at all if you leave it as unsigned long.
> I don't know if there are static checkers which care, but if there are
> then those checkers are wrong.  It's nicer to not have the unnecesary
> cast.

Oop.  It's a GCC warning...

People accept such absolute garbage from GCC.  It's like in Africa when
you get bitten by a snake they rub cow dung into the wound.  If it hurts
it must be good.

regards,
dan carpenter

  reply	other threads:[~2022-03-16  9:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 20:50 [PATCH v2 0/6] staging: r8188eu: some rx cleanups Martin Kaiser
2022-03-15 20:50 ` [PATCH v2 1/6] staging: r8188eu: remove unnecessary initializations Martin Kaiser
2022-03-15 20:50 ` [PATCH v2 2/6] staging: r8188eu: remove three unused receive defines Martin Kaiser
2022-03-15 20:50 ` [PATCH v2 3/6] staging: r8188eu: remove unused function prototype Martin Kaiser
2022-03-15 20:50 ` [PATCH v2 4/6] staging: r8188eu: make rtl8188e_process_phy_info static Martin Kaiser
2022-03-15 20:50 ` [PATCH v2 5/6] staging: r8188eu: remove some unused local ieee80211 macros Martin Kaiser
2022-03-15 20:50 ` [PATCH v2 6/6] staging: r8188eu: remove local BIT macro Martin Kaiser
2022-03-16  6:40   ` Greg Kroah-Hartman
2022-03-16  9:01   ` Dan Carpenter
2022-03-16  9:27     ` Dan Carpenter [this message]
2022-03-16 14:10 ` [PATCH v2 0/6] staging: r8188eu: some rx cleanups Greg Kroah-Hartman

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=20220316092743.GD1841@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).