From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
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 09:56:16 -0400 [thread overview]
Message-ID: <20241025135616.GA407109@yaz-khff2.amd.com> (raw)
In-Reply-To: <6b914abf-b3ce-4baa-b4d7-f8da9a840a3f@stanley.mountain>
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
Thanks,
Yazen
next prev parent reply other threads:[~2024-10-25 13:56 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 [this message]
2024-10-25 14:06 ` Dan Carpenter
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=20241025135616.GA407109@yaz-khff2.amd.com \
--to=yazen.ghannam@amd.com \
--cc=bp@alien8.de \
--cc=dan.carpenter@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.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®