All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Zhu Jun <zhujun2@cmss.chinamobile.com>
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/applicom:Removed the unused variable byte_reset_it
Date: Tue, 8 Oct 2024 09:47:55 +0200	[thread overview]
Message-ID: <2024100808-antarctic-matching-9be0@gregkh> (raw)
In-Reply-To: <20241008072825.12937-1-zhujun2@cmss.chinamobile.com>

On Tue, Oct 08, 2024 at 12:28:25AM -0700, Zhu Jun wrote:
> Remove unused variable and redundant readb in ac_register_board
> 
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
> ---
>  drivers/char/applicom.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
> index 9fed9706d9cd..ea25caf35346 100644
> --- a/drivers/char/applicom.c
> +++ b/drivers/char/applicom.c
> @@ -127,8 +127,6 @@ static int dummy;	/* dev_id for request_irq() */
>  static int ac_register_board(unsigned long physloc, void __iomem *loc, 
>  		      unsigned char boardno)
>  {
> -	volatile unsigned char byte_reset_it;
> -
>  	if((readb(loc + CONF_END_TEST)     != 0x00) ||
>  	   (readb(loc + CONF_END_TEST + 1) != 0x55) ||
>  	   (readb(loc + CONF_END_TEST + 2) != 0xAA) ||
> @@ -156,7 +154,6 @@ static int ac_register_board(unsigned long physloc, void __iomem *loc,
>  	apbs[boardno].RamIO = loc;
>  	init_waitqueue_head(&apbs[boardno].FlagSleepSend);
>  	spin_lock_init(&apbs[boardno].mutex);
> -	byte_reset_it = readb(loc + RAM_IT_TO_PC);

As Arnd said, this is doing something, please be more familiar with
hardware types (i.e. reads are required to ensure a write happens),
before removing lines that feel they are not needed, unless you can test
the driver change yourself.

thanks,

greg k-h

      parent reply	other threads:[~2024-10-08  7:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08  7:28 [PATCH] drivers/applicom:Removed the unused variable byte_reset_it Zhu Jun
2024-10-08  7:41 ` Arnd Bergmann
2024-10-08  7:47 ` Greg KH [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=2024100808-antarctic-matching-9be0@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhujun2@cmss.chinamobile.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.