On 30/03/2021 02:20, David Sterba wrote:
On Thu, Mar 25, 2021 at 10:41:43PM +0800, Anand Jain wrote:
On 25/03/2021 15:14, Qu Wenruo wrote:
+static ssize_t supported_sectorsizes_show(struct kobject *kobj,
+                                         struct kobj_attribute *a,
+                                         char *buf)
+{
+       ssize_t ret = 0;
+
+       /* Only support sectorsize == PAGE_SIZE yet */
+       ret += scnprintf(buf + ret, PAGE_SIZE - ret, "%lu\n",
+                        PAGE_SIZE);
+       return ret;
+}

    ret can be removed completely here.

You mean to do 'return scnprintf(...)' ?

yes.

For now it's just a single
value returned but with further support there will be a pattern like is
eg. in supported_checksums_show, so it's ok as a preparatory work.
 Ok.

Reviewed-by: Anand Jain <anand.j...@oracle.com>

Reply via email to