From: Greg KH <gregkh@linuxfoundation.org>
To: Eric Florin <ericflorin.kernel@gmail.com>
Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: sm750fb: clean-up `else`-blocks
Date: Fri, 18 Apr 2025 12:39:41 +0200 [thread overview]
Message-ID: <2025041805-ammonium-scouting-dad6@gregkh> (raw)
In-Reply-To: <20250418035023.27067-1-ericflorin.kernel@gmail.com>
On Thu, Apr 17, 2025 at 08:50:23PM -0700, Eric Florin wrote:
> Clean-up `else`-blocks in `hw_sm750_map` that occur after `if`-blocks that
> terminate function execution.
>
> Signed-off-by: Eric Florin <ericflorin.kernel@gmail.com>
> ---
> drivers/staging/sm750fb/sm750_hw.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
> index 4bc89218c11c..64b199061d14 100644
> --- a/drivers/staging/sm750fb/sm750_hw.c
> +++ b/drivers/staging/sm750fb/sm750_hw.c
> @@ -55,9 +55,8 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
> pr_err("mmio failed\n");
> ret = -EFAULT;
> goto exit;
> - } else {
> - pr_info("mmio virtual addr = %p\n", sm750_dev->pvReg);
> }
> + pr_info("mmio virtual addr = %p\n", sm750_dev->pvReg);
When drivers work properly, they are "quiet". This driver is not quiet
at all. So this really should be a call to dev_dbg(), right?
>
> sm750_dev->accel.dprBase = sm750_dev->pvReg + DE_BASE_ADDR_TYPE1;
> sm750_dev->accel.dpPortBase = sm750_dev->pvReg + DE_PORT_ADDR_TYPE1;
> @@ -84,9 +83,8 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
> pr_err("Map video memory failed\n");
> ret = -EFAULT;
> goto exit;
> - } else {
> - pr_info("video memory vaddr = %p\n", sm750_dev->pvMem);
> }
> + pr_info("video memory vaddr = %p\n", sm750_dev->pvMem);
Same here.
thanks,
greg k-h
prev parent reply other threads:[~2025-04-18 10:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 3:50 [PATCH] staging: sm750fb: clean-up `else`-blocks Eric Florin
2025-04-18 10:39 ` 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=2025041805-ammonium-scouting-dad6@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=ericflorin.kernel@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=sudipm.mukherjee@gmail.com \
--cc=teddy.wang@siliconmotion.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).