mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Xuezhi Zhang <zhangxuezhi3@gmail.com>,
	kashyap.desai@broadcom.com, sumit.saxena@broadcom.com,
	shivasharan.srikanteshwara@broadcom.com, jejb@linux.ibm.com,
	martin.petersen@oracle.com
Cc: megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Xuezhi Zhang <zhangxuezhi1@coolpad.com>
Subject: Re: [PATCH] scsi: megaraid: convert sysfs snprintf to sysfs_emit
Date: Thu, 1 Sep 2022 09:24:48 +0900	[thread overview]
Message-ID: <a4a486b3-7acc-090f-d9c5-bac7a2239482@opensource.wdc.com> (raw)
In-Reply-To: <20220831140325.396295-1-zhangxuezhi3@gmail.com>

On 8/31/22 23:03, Xuezhi Zhang wrote:
> From: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
> 
> Fix up all sysfs show entries to use sysfs_emit
> 
> Signed-off-by: Xuezhi Zhang <zhangxuezhi1@coolpad.com>

Looks OK.

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

> ---
>  drivers/scsi/megaraid/megaraid_mbox.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
> index 157c3bdb50be..132de68c14e9 100644
> --- a/drivers/scsi/megaraid/megaraid_mbox.c
> +++ b/drivers/scsi/megaraid/megaraid_mbox.c
> @@ -3979,7 +3979,7 @@ megaraid_mbox_app_hndl_show(struct device *dev, struct device_attribute *attr, c
>  
>  	app_hndl = mraid_mm_adapter_app_handle(adapter->unique_id);
>  
> -	return snprintf(buf, 8, "%u\n", app_hndl);
> +	return sysfs_emit(buf, "%u\n", app_hndl);
>  }
>  
>  
> @@ -4048,7 +4048,7 @@ megaraid_mbox_ld_show(struct device *dev, struct device_attribute *attr, char *b
>  		}
>  	}
>  
> -	return snprintf(buf, 36, "%d %d %d %d\n", scsi_id, logical_drv,
> +	return sysfs_emit(buf, "%d %d %d %d\n", scsi_id, logical_drv,
>  			ldid_map, app_hndl);
>  }
>  

-- 
Damien Le Moal
Western Digital Research


      reply	other threads:[~2022-09-01  0:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 14:03 Xuezhi Zhang
2022-09-01  0:24 ` Damien Le Moal [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=a4a486b3-7acc-090f-d9c5-bac7a2239482@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=jejb@linux.ibm.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=megaraidlinux.pdl@broadcom.com \
    --cc=shivasharan.srikanteshwara@broadcom.com \
    --cc=sumit.saxena@broadcom.com \
    --cc=zhangxuezhi1@coolpad.com \
    --cc=zhangxuezhi3@gmail.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®