Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1414169pxb; Thu, 28 Oct 2021 03:16:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKdOdUDvhgpz8lyIRy9oNsgwQ5QJTOpqhRdlEpY9QSLCKYSk57ZQuW0/xwfoh8jOn+k9jj X-Received: by 2002:a50:9f8b:: with SMTP id c11mr4752136edf.251.1635416218046; Thu, 28 Oct 2021 03:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635416218; cv=none; d=google.com; s=arc-20160816; b=sxhklUIn10Cx7S+7iWpqVJOz6CCyRGrqd4kXvxUYLkj5k/fAOBMleKzBN7h/1fzkAJ TjnG/LWHBl/70O6Vuwj8VVsMP/EPEMexuNyTl0gSgANSF+yavAHvc9z4lNsOFeFtd2hu 7TLk2dmNOVd1OZ68UJWH41n1YzK7KELkLHb4Vcws2hFzUT1CMUqWqWKFH7+hHxsecbSV e2mRvsCWuI65hqGvhwKYyj8UqcD/6YCeKWZLYvcBpL20SBbADJd9WvE3ydVMmrZzThSQ OpwFiajJuyW86QdhzqcvRw9VHKmgao3KblMbHGukTNwx9F9KgxituGVMUXBKR0vw/l/d rhMg== 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:dkim-signature; bh=cGRFFkbWPTpn78tArCV7l81qRRNeflw+gfeWzgd3Hsg=; b=nntjhuF/OiYyd7KOn+beAqnNM3QrHpxIsdtRM9aYwZPmU0qtu26xOle8x4XMvKTtvP Vwp2cW1hJee8YW2dnaTh1VjK4eBYlaNi6qyZZ6aP6rdDcMdwA9KrtVcC6yHScMfgiEPx OM4Y2PSQMZzfGpiHHa7TraqbGPJlra7jXZ2czOEN6L5pZAnulA9F+ALXQXiuliPiqQJK FSoG9Yui6ypse59xXzKYkc0TiXJtQR5yhzWCpX3uVt/l7jODA5bztu30All2//S/Qwu/ 4zAkN9dcJ83QDmWaDrMX1Y06U63jpbsgcjza9KAhtCTpZuwJjnCTobTGP63L3zzey65d uDIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AOCFHTvx; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs9si4239765ejc.109.2021.10.28.03.16.34; Thu, 28 Oct 2021 03:16:58 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AOCFHTvx; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbhJ1KQx (ORCPT + 99 others); Thu, 28 Oct 2021 06:16:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbhJ1KQv (ORCPT ); Thu, 28 Oct 2021 06:16:51 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 211C2C061570; Thu, 28 Oct 2021 03:14:24 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id p40so665603pfh.8; Thu, 28 Oct 2021 03:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cGRFFkbWPTpn78tArCV7l81qRRNeflw+gfeWzgd3Hsg=; b=AOCFHTvxB2nikILO2omNQt5gXOpPro5gwBYzusab4FwTwq5bh5BY1w0XHmZbX2KNcc ezGnMbIC8G0V4A2FtTUQ8WZYZgPJFf1QasqgKO3DS6YMsHqLdlFOPIwuRDG8f5YH9cqv YxvOU2rjuiXlBib160jJnV/TORTJ16c/Qj9ovOWb2fl7YSJ4gBWE9qa04KFgcJFi4uGd AboAe0zGa0SMsyMeFTm8F8M/7IJIIq6gTeft0mxT/HSVLEdN8yt/VbH7IrR6XwZIyk+U VSXst6JBK2pvKVyJoboL4Eqf2oh1R/yTTZSSddDwwgpFnJR5AypDCtuNws81iExCyF0U URsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cGRFFkbWPTpn78tArCV7l81qRRNeflw+gfeWzgd3Hsg=; b=73qJnnxwUKGA7u+vBTSoEGxega2LSr1ujgX/LtZ2PKGP0br5e2TGTF/FPMD/dRWInr zNxrdKijm2OQgYl9mze+d5+jT/VLwZHJNWtnG7z/T6bvOxOV82q02S88v1kFJVHT05pE mnTnwWnpgYxybpBeH5Dk45PsAQRYHg9Ioa55yraWZrgt/iSYtRqPp5MNg7QgbRoe7ohi 8isa/7DIL5Hd3VifhkNiOZzBd77pg9X/zrjmzC0UwUDbEt81YuPx/xe7qg7K9HzIwVhF vKfn0EnIUYxq0R6kpQdJX1dR1z+PWTqBSCcVf7Bc2G85B5lnFktia3YN5syyoa9sDwT4 FhoA== X-Gm-Message-State: AOAM530NG/7jkQ1j/80YuPjbIpJE2rJ0SS0Ntl68P7f9CrDSnGwNKvF2 GXV30ugPN2uksPTdv+xl+xA= X-Received: by 2002:a63:85c1:: with SMTP id u184mr2481407pgd.243.1635416063677; Thu, 28 Oct 2021 03:14:23 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id mt16sm2468674pjb.22.2021.10.28.03.14.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 03:14:23 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: yao.jing2@zte.com.cn To: gregkh@linuxfoundation.org Cc: jirislaby@kernel.org, johan@kernel.org, macro@orcam.me.uk, fancer.lancer@gmail.com, andrew@aj.id.au, pali@kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jing Yao , Zeal Robot Subject: [PATCH] drivers: tty: replace snprintf in show functions with sysfs_emit Date: Thu, 28 Oct 2021 10:13:50 +0000 Message-Id: <20211028101350.14172-1-yao.jing2@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jing Yao Reported-by: Zeal Robot Signed-off-by: Jing Yao --- drivers/tty/serial/8250/8250_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index 5775cbff8f6e..557e8b13b5c1 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -3099,7 +3099,7 @@ static ssize_t rx_trig_bytes_show(struct device *dev, if (rxtrig_bytes < 0) return rxtrig_bytes; - return snprintf(buf, PAGE_SIZE, "%d\n", rxtrig_bytes); + return sysfs_emit(buf, PAGE_SIZE, "%d\n", rxtrig_bytes); } static int do_set_rxtrig(struct tty_port *port, unsigned char bytes) -- 2.25.1