Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp939214pxb; Wed, 3 Mar 2021 21:50:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxplpQfj4LFz/7sjLbScYULFUFySdDI8JgJZrNP7JEA9aGzxIj5B2mmjeGvG2Uiw8RKhCPD X-Received: by 2002:aa7:c94a:: with SMTP id h10mr2631393edt.41.1614837000733; Wed, 03 Mar 2021 21:50:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614837000; cv=none; d=google.com; s=arc-20160816; b=W/cLI5VqO1o4PiR7sx4/gzqWtPj0orz6ouJsV6fSjOxLVJsqtArF95/T8/thOVlLzM JA3615tSg/dbqBegujIU5SnCHjCaWqmfBH0IRw50sZxjJ78Jjh1yaYPxysTlV2apleYU dppCOm37hiHzI8dAeKM6mqaC4yXpzBndNKgPXFLQuzi9i5bI2Ag3AvwqurdgJiuHiwM8 z+R+TYKITSvdttrt5RD8rXhIFhab6XERyJsDIx5xM7qw7Ub5Gk9uPJ2quJTdGh6XegW2 G8fbzik2mAXmQH1Hgmh+MSOt56UNB6Zotigxh52zclr8uHNwBuRwawGOcPy52lzy6i58 kSsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=2DAhpkthJo/xq1gCl1lBYhsQRUL5Gwt6/A7AD+9UdyY=; b=jmGrd+nxHYILOK+bkzax1mrNgTq8vYK/N19BIcue/+a81Sv9FvMab+QPTaY6J6lerN VKpk391RCFok88iqCRPzgBHgrfBA1jWP4l6X6huco2eQq4XcFF+GthcwSPBc2rknH9GE coHCZgrqHmstMccMpRvqHvn1kyH1vAYsNsuLc1XtDLbe+63PbNhAFpJiykQSGMMaNYip BJBrhJgxn3Hfx+B6nvMu7t+2uhj6kaNrk/FwUbJ3DKuszAfsb9jbUmpTMyP4zONa9e5U mDGdSVqCREIq1K8NE/gQbL4BaoAaqxAn4BCkgdqWc4uoq6PknNIBonFOiBLipMa5wnxX Hd0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si19256305ede.232.2021.03.03.21.49.38; Wed, 03 Mar 2021 21:50:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1836381AbhCBHBg (ORCPT + 99 others); Tue, 2 Mar 2021 02:01:36 -0500 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:40612 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1835643AbhCBGJH (ORCPT ); Tue, 2 Mar 2021 01:09:07 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R321e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UQ3O-B3_1614665299; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UQ3O-B3_1614665299) by smtp.aliyun-inc.com(127.0.0.1); Tue, 02 Mar 2021 14:08:24 +0800 From: Jiapeng Chong To: alim.akhtar@samsung.com Cc: avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] scsi: ufs: convert sysfs sprintf/snprintf family to sysfs_emit Date: Tue, 2 Mar 2021 14:08:18 +0800 Message-Id: <1614665298-115183-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./drivers/scsi/ufs/ufshcd.c:1538:8-16: WARNING: use scnprintf or sprintf. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 7716175..7fb94d7 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -1535,7 +1535,7 @@ static ssize_t ufshcd_clkscale_enable_show(struct device *dev, { struct ufs_hba *hba = dev_get_drvdata(dev); - return snprintf(buf, PAGE_SIZE, "%d\n", hba->clk_scaling.is_enabled); + return sysfs_emit(buf, "%d\n", hba->clk_scaling.is_enabled); } static ssize_t ufshcd_clkscale_enable_store(struct device *dev, -- 1.8.3.1