[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191209081023.GC706232@kroah.com>
Date: Mon, 9 Dec 2019 09:10:23 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Sourabh Jain <sourabhjain@...ux.ibm.com>
Cc: mpe@...erman.id.au, mahesh@...ux.vnet.ibm.com,
hbathini@...ux.ibm.com, linux-kernel@...r.kernel.org,
linuxppc-dev@...abs.org, corbet@....net, linux-doc@...r.kernel.org
Subject: Re: [PATCH v5 3/6] powerpc/fadump: reorganize /sys/kernel/fadump_*
sysfs files
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
Powered by blists - more mailing lists