mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Artem Shelenko <artem.shelenko@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: use unsigned int in HAL interface
Date: Sat, 26 Sep 2026 15:59:55 +0300	[thread overview]
Message-ID: <arfBy_n6FsDI39p-@stanley.mountain> (raw)
In-Reply-To: <20260926125150.161466-1-Artem.Shelenko@gmail.com>

On Sat, Sep 26, 2026 at 03:51:50PM +0300, Artem Shelenko wrote:
> The rtl8723bs TODO asks to convert remaining unusual variable types.
> 
> Replace uses of the uint typedef with unsigned int in rtw_hal_init()
> and rtw_hal_deinit(), including their local status variables and
> declarations. uint is a typedef for unsigned int, so this does not
> change behavior.
> 

This sort of patch isn't the correct thing.  These functions should
be changed to return zero on success and standard negative error codes
on failure.

It's actually a good thing when bad code looks bad because then there
are tools which complain about it and it motivates people to fix it
correctly.  That's the whole point of static checkers to complain about
bad code, so we're working against ourselves by silencing the checkers.

regards,
dan carpenter


      reply	other threads:[~2026-09-26 13:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-26 12:51 Artem Shelenko
2026-09-26 12:59 ` 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=arfBy_n6FsDI39p-@stanley.mountain \
    --to=error27@gmail.com \
    --cc=artem.shelenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®