Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1740858ybl; Thu, 9 Jan 2020 00:30:06 -0800 (PST) X-Google-Smtp-Source: APXvYqy+nppBjQ3TXPAiJIQ7xTUip//b6AeD65NTdOub6SIJ1eYeKR958AZnGyhJAVudT7E5iBXD X-Received: by 2002:aca:5658:: with SMTP id k85mr2094766oib.153.1578558606695; Thu, 09 Jan 2020 00:30:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578558606; cv=none; d=google.com; s=arc-20160816; b=DdZGfiWiI/VxJSTndIytRadHwa9aMT3F8acOUdi+JL37JgXOucjkusURpZyyIfUu0u /sB/3YNymoYuxK7wX/Bp/nrNOTsrxzoze8UHuvi7lmg3wE4urUAkmL9t2dx2a5PO8P2A tBZSd7tcAqnzLGCbOgR1Xv5epy5GenYkPBXGrrbxw5xIYDd1DI01m03jNDSXv8s5vXaS hti5d0yx4EgdhBSBw0PCQ2Qo+p0luplS50ZFHo15Pc45e42m4Y+G4sbUozcVdSG7uoxM S/XoMDhopM8l64l8w08kRlWRdXKEyN14aJkdIvG4yihswoTHzaZZzDHSydhNAaUMwybk 6FOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=0iWKk7tbcpe9Bo5MJNVVR5zJudhv6/LJ/r4/+THgVqw=; b=oxm1bbkPuKhBfPuORtYqw3wIi/akcrpG02mOxs3BLaC5j3xYTKHkp8JhZtR01YyGwq w3il2MGtrYWworUBTPe55gxnwimw4M0ejk5UUbXuG7a0//DgJtXmBYN60EEqNpL0txzW L6IfzwG8iPIdlCkjcXse5eJ3sRiQqXlQFEmJVa5pdf+9rhefU0Ow0DXOTYr1k+Ijlg9o qfx4tSyg9FGTIsIUE5TEfJYjlXyUZvGzprjwrqZFXqVs9BSp84Za7+op7lIuJEGewm/T 2XaOy7zZnkv0RMtfU6ScpWqax+TwBhVe/GD4Diu69SFQofl5jc/rvZFwvt0ZG03Dhm+r Ou3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 185si3126526oie.52.2020.01.09.00.29.54; Thu, 09 Jan 2020 00:30:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728469AbgAII3B convert rfc822-to-8bit (ORCPT + 99 others); Thu, 9 Jan 2020 03:29:01 -0500 Received: from mga03.intel.com ([134.134.136.65]:37574 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728347AbgAII3B (ORCPT ); Thu, 9 Jan 2020 03:29:01 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2020 00:29:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,413,1571727600"; d="scan'208";a="223807148" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 09 Jan 2020 00:29:00 -0800 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 9 Jan 2020 00:29:00 -0800 Received: from hasmsx107.ger.corp.intel.com (10.184.198.27) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 9 Jan 2020 00:29:00 -0800 Received: from hasmsx108.ger.corp.intel.com ([169.254.9.201]) by hasmsx107.ger.corp.intel.com ([169.254.2.38]) with mapi id 14.03.0439.000; Thu, 9 Jan 2020 10:28:57 +0200 From: "Winkler, Tomas" To: Greg Kroah-Hartman CC: "Usyskin, Alexander" , "linux-kernel@vger.kernel.org" Subject: RE: [char-misc-next] mei: bus: use simple sprintf for sysfs Thread-Topic: [char-misc-next] mei: bus: use simple sprintf for sysfs Thread-Index: AQHVpD4rc6pNNd3uI0Gbg1zkUnbit6fiQG+g Date: Thu, 9 Jan 2020 08:28:56 +0000 Message-ID: <5B8DA87D05A7694D9FA63FD143655C1B9DD64927@hasmsx108.ger.corp.intel.com> References: <20191126123002.4835-1-tomas.winkler@intel.com> In-Reply-To: <20191126123002.4835-1-tomas.winkler@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.184.70.11] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Replace scnprintf with simple sprintf for sysfs files. > it is implicitly known that the buffer is big enough for the variables to fit in. > > Signed-off-by: Tomas Winkler Hi Greg, hope you have great holiday, has anything changed in the misc-char dev process, no patches were staged including this one? Thanks Tomas > --- > drivers/misc/mei/bus.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index > a0a495c95e3c..8d468e0a950a 100644 > --- a/drivers/misc/mei/bus.c > +++ b/drivers/misc/mei/bus.c > @@ -765,7 +765,7 @@ static ssize_t uuid_show(struct device *dev, struct > device_attribute *a, > struct mei_cl_device *cldev = to_mei_cl_device(dev); > const uuid_le *uuid = mei_me_cl_uuid(cldev->me_cl); > > - return scnprintf(buf, PAGE_SIZE, "%pUl", uuid); > + return sprintf(buf, "%pUl", uuid); > } > static DEVICE_ATTR_RO(uuid); > > @@ -775,7 +775,7 @@ static ssize_t version_show(struct device *dev, struct > device_attribute *a, > struct mei_cl_device *cldev = to_mei_cl_device(dev); > u8 version = mei_me_cl_ver(cldev->me_cl); > > - return scnprintf(buf, PAGE_SIZE, "%02X", version); > + return sprintf(buf, "%02X", version); > } > static DEVICE_ATTR_RO(version); > > @@ -797,7 +797,7 @@ static ssize_t max_conn_show(struct device *dev, > struct device_attribute *a, > struct mei_cl_device *cldev = to_mei_cl_device(dev); > u8 maxconn = mei_me_cl_max_conn(cldev->me_cl); > > - return scnprintf(buf, PAGE_SIZE, "%d", maxconn); > + return sprintf(buf, "%d", maxconn); > } > static DEVICE_ATTR_RO(max_conn); > > @@ -807,7 +807,7 @@ static ssize_t fixed_show(struct device *dev, struct > device_attribute *a, > struct mei_cl_device *cldev = to_mei_cl_device(dev); > u8 fixed = mei_me_cl_fixed(cldev->me_cl); > > - return scnprintf(buf, PAGE_SIZE, "%d", fixed); > + return sprintf(buf, "%d", fixed); > } > static DEVICE_ATTR_RO(fixed); > > @@ -817,7 +817,7 @@ static ssize_t max_len_show(struct device *dev, struct > device_attribute *a, > struct mei_cl_device *cldev = to_mei_cl_device(dev); > u32 maxlen = mei_me_cl_max_len(cldev->me_cl); > > - return scnprintf(buf, PAGE_SIZE, "%u", maxlen); > + return sprintf(buf, "%u", maxlen); > } > static DEVICE_ATTR_RO(max_len); > > -- > 2.21.0