Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2757162pxb; Sat, 6 Feb 2021 06:51:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSzGpI/d4CRlAbjAr1hdaiDHy1R+GdEjhfuPL1G3jFOarsrVZyuJ6IinxD3ZFrCit+/2nh X-Received: by 2002:aa7:d358:: with SMTP id m24mr1874605edr.118.1612623067158; Sat, 06 Feb 2021 06:51:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612623067; cv=none; d=google.com; s=arc-20160816; b=G9dOnuQuHApVrXvhllbzeixOUV6EUchyqcJnkvjkfzbnrXlGrLILvnE2k147nfdFK+ kERqMuEJ/BDuLn1uY7VChQ+OCjWR/wYl9VG3jGk+jj5mxKYU9c9+in6/lTCuMxS6EoqA p8atbTs7SnzVr0ttt5MadWMmZY2G+z5sG2Yn1gVVLsrO4PIX7erYSSOJykP8iKFo3qXS iB3wrVtdpyOgbWWNqO+zG8QGV2gwzYk/xRntTo5CETK/eGctJs/JHqiOiB4tNQ83EwY4 hsqUnT47AipTe0/gROj6uNiqgUJkGR5jfkhpBOzwPQsxrRA7o86mip3b7gwQQIBd+Hrg ThPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=eCYirGdag3tfz9Bkn2EOr8spu3OMpx+nOVceNqOyQhI=; b=BzI0XP+7+wt2XmpNXUJP+GHW/Zwgp+j5SbUU3YuS6KWNwwSmocJknn3FGpy1/0rkCa 3Bm3ShBE0s/UR46FTsANklVbOOORehrDxvuja2VdYBH/gSw3YNIIvtHD6I6UJCBdbgiG /x5LP+UPdyALHTHT20HtTjaOCBGXikoqdQtwgwWw0kjDCBJ03VG/LJ11mX9E29bZgACd aywOUR8Xosp7EcO1qdKD8VVoL9dv0HJ+Q21RvGghkHaEJU7q3EoGRuIwNTBC0EH9yH8k +MPLOXyLRpxlRIbtk1P+vGdCvW8B2B/UEqUPr/4fkBG5AFdZ+wp/l71IlRquPfNnpLkr OXSQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qu20si7434330ejb.436.2021.02.06.06.50.42; Sat, 06 Feb 2021 06:51:07 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230170AbhBFOoZ (ORCPT + 99 others); Sat, 6 Feb 2021 09:44:25 -0500 Received: from mga01.intel.com ([192.55.52.88]:38614 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbhBFOoT (ORCPT ); Sat, 6 Feb 2021 09:44:19 -0500 IronPort-SDR: NBUmpEfGSXlHL5HRMzrhxcM+CSukKhsfc2T6cmwO62uGiXns82iX7z0DjjcSxlaVAhffG4q3G6 255YfuSiOpKA== X-IronPort-AV: E=McAfee;i="6000,8403,9886"; a="200566032" X-IronPort-AV: E=Sophos;i="5.81,158,1610438400"; d="scan'208";a="200566032" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2021 06:43:39 -0800 IronPort-SDR: dd39Z3IBKfPGMl3TSWBVLethjAFJrtzYBub2FVxh1lDhX14d8REEf3IUpBN24dvVfK9Gwj1GWh hwlKwFXtMCqw== X-IronPort-AV: E=Sophos;i="5.81,158,1610438400"; d="scan'208";a="394360209" Received: from twinkler-lnx.jer.intel.com ([10.12.91.138]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2021 06:43:37 -0800 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , linux-kernel@vger.kernel.org, Tomas Winkler Subject: [char-misc-next 1/6] mei: use sprintf in tx_queue_limit_show sysfs Date: Sat, 6 Feb 2021 16:43:20 +0200 Message-Id: <20210206144325.25682-1-tomas.winkler@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using of snprintf is discouraged in sysfs. For simple u8 it is safe to use sprintf. Signed-off-by: Tomas Winkler --- drivers/misc/mei/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index 9f6682033ed7..24a05f45b639 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -1026,7 +1026,7 @@ static ssize_t tx_queue_limit_show(struct device *device, size = dev->tx_queue_limit; mutex_unlock(&dev->device_lock); - return snprintf(buf, PAGE_SIZE, "%u\n", size); + return sprintf(buf, "%u\n", size); } static ssize_t tx_queue_limit_store(struct device *device, -- 2.26.2