linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Sourabh Jain <sourabhjain@linux.ibm.com>
Cc: mpe@ellerman.id.au, mahesh@linux.vnet.ibm.com,
	hbathini@linux.ibm.com, linux-kernel@vger.kernel.org,
	linuxppc-dev@ozlabs.org, corbet@lwn.net,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH v5 3/6] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files
Date: Mon, 9 Dec 2019 09:10:23 +0100	[thread overview]
Message-ID: <20191209081023.GC706232@kroah.com> (raw)
In-Reply-To: <20191209045826.30076-4-sourabhjain@linux.ibm.com>

On Mon, Dec 09, 2019 at 10:28:23AM +0530, Sourabh Jain wrote:
> +#define CREATE_SYMLINK(target, symlink_name) do {\
> +	rc = compat_only_sysfs_link_entry_to_kobj(kernel_kobj, fadump_kobj, \
> +						  target, symlink_name); \
> +	if (rc) \
> +		pr_err("unable to create %s symlink (%d)", symlink_name, rc); \
> +} while (0)


No need for a macro, just spell it all out.  And properly clean up if an
error happens, you are just printing it out and moving on, which is
probably NOT what you want to do, right?

> +static struct attribute_group fadump_group = {
> +	.attrs = fadump_attrs,
> +};

ATTRIBUTE_GROUPS()?

thanks,

greg k-h

  reply	other threads:[~2019-12-09  8:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09  4:58 [PATCH v5 0/6] reorganize and add FADump sysfs files Sourabh Jain
2019-12-09  4:58 ` [PATCH v5 1/6] Documentation/ABI: add ABI documentation for /sys/kernel/fadump_* Sourabh Jain
2019-12-09  4:58 ` [PATCH v5 2/6] sysfs: wrap __compat_only_sysfs_link_entry_to_kobj function to change the symlink name Sourabh Jain
2019-12-09  4:58 ` [PATCH v5 3/6] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files Sourabh Jain
2019-12-09  8:10   ` Greg KH [this message]
2019-12-10  1:42     ` Sourabh Jain
2019-12-09  4:58 ` [PATCH v5 4/6] powerpc/powernv: move core and fadump_release_opalcore under new kobject Sourabh Jain
2019-12-09  4:58 ` [PATCH v5 5/6] Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated Sourabh Jain
2019-12-09  4:58 ` [PATCH v5 6/6] powerpc/fadump: sysfs for fadump memory reservation Sourabh Jain

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=20191209081023.GC706232@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=corbet@lwn.net \
    --cc=hbathini@linux.ibm.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=sourabhjain@linux.ibm.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).