From: Dan Carpenter <dan.carpenter@linaro.org>
To: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] RAS/AMD/FMPM: Remove some dead code
Date: Fri, 25 Oct 2024 17:06:57 +0300 [thread overview]
Message-ID: <8412cc2d-7713-4a79-a7e8-5759e3320aa6@stanley.mountain> (raw)
In-Reply-To: <20241025135616.GA407109@yaz-khff2.amd.com>
On Fri, Oct 25, 2024 at 09:56:16AM -0400, Yazen Ghannam wrote:
> On Fri, Oct 25, 2024 at 10:08:34AM +0300, Dan Carpenter wrote:
> > Debugfs functions don't return NULL, they return error pointers. Debugfs
> > functions are slightly unusual because they're not supposed to be checked
> > for errors in the normal case. Delete these checks.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> > ---
> > drivers/ras/amd/fmpm.c | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/drivers/ras/amd/fmpm.c b/drivers/ras/amd/fmpm.c
> > index 90de737fbc90..3cde1fe17a7a 100644
> > --- a/drivers/ras/amd/fmpm.c
> > +++ b/drivers/ras/amd/fmpm.c
> > @@ -956,12 +956,7 @@ static void setup_debugfs(void)
> > return;
> >
> > fmpm_dfs_dir = debugfs_create_dir("fmpm", dfs);
> > - if (!fmpm_dfs_dir)
> > - return;
> > -
> > fmpm_dfs_entries = debugfs_create_file("entries", 0400, fmpm_dfs_dir, NULL, &fmpm_fops);
> > - if (!fmpm_dfs_entries)
> > - debugfs_remove(fmpm_dfs_dir);
> > }
> >
> > static const struct x86_cpu_id fmpm_cpuids[] = {
> > --
>
> Seems like we had the same idea. :)
>
> https://lore.kernel.org/r/20241024155503.GA965@yaz-khff2.amd.com
>
Ah. Good. To me it's always encouraging when people end up writing basically
the exact same patch.
regards,
dan carpenter
prev parent reply other threads:[~2024-10-25 14:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 7:08 Dan Carpenter
2024-10-25 13:56 ` Yazen Ghannam
2024-10-25 14:06 ` 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=8412cc2d-7713-4a79-a7e8-5759e3320aa6@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=bp@alien8.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=yazen.ghannam@amd.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
all inboxes | Powered by JetHome®