Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp736917pxb; Tue, 14 Sep 2021 07:42:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpbV3JIz/PadYCfFzpnrhAz9P8dK3/tD2F+/BM7dHqM2NI4QD9Pcc5GjMDOIOuWsSTA6c5 X-Received: by 2002:a17:906:7d42:: with SMTP id l2mr14526834ejp.467.1631630551522; Tue, 14 Sep 2021 07:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631630551; cv=none; d=google.com; s=arc-20160816; b=lTcT33Uy9odNQSDuuLHD5OcR8MSjLSvO/ksuwvP2+xtKVGrVmqPp+/Jaqjw91K1U0q Vlr09tbOQFsO/NB0vQL45uJvc68OMWxwVsvOO9Zd7xSH2ngKSD71tyisvLEzk/pBI5KJ vj5txLoHTSjEu1iibB2451FsjidYWBF3upykssLWbQAF1j2c7e3Vqqy81fp1ejAKJQrz 5fU6NpoCH8fSqdMfJ1RA1iY6jgVP1gMHGkdTpkbz2LGrHlrxbuL9Z3skY/KolCHlE8sK SdAXcRdU3AUjkewcI99dw5GxfBG78VHJFtGotEssgoplxgnIEKv//KuRGBbOLpY0dpHC 7nIQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KR85vhBm7OdRJSrXPuWOYjWrzupJ9iQuWzFth3nH7lI=; b=O7W10plrLPxXRMmUrzmjJgWXHoNlYyLW3XfdCWnZdi5jSGQrDnJiGx4j1uiLlhFf4S uJM5b6dDUgAQgyynlO5BrivTUICnSVH8/NH4jtU67Cfne63ZnjQ0sr0l4wTu1iVb8pKF rss4J8gF9k2GOUBQ3JmzE0COsbHaAbVOSRi470MMuBZZjKj4MOIjMAY2wEtviJ2Le3yE a+j1rOQsavsJedytqtov3WJAEsZ6jOfby816NgvD/cYGVV+lSpl2CjsvjDN4VlMQgdcx xM+d3Reyiz5ScrQSrPOf9WrRlcQQgcNR7bPuw5at5u9ZIBpleet779/uvhaT2qY4lwnk 9z5A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq26si10813565edb.577.2021.09.14.07.42.07; Tue, 14 Sep 2021 07:42:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234077AbhINOkz (ORCPT + 99 others); Tue, 14 Sep 2021 10:40:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234376AbhINOkO (ORCPT ); Tue, 14 Sep 2021 10:40:14 -0400 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B1ADC061574 for ; Tue, 14 Sep 2021 07:38:45 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:d46f:7eb5:4a37:9d14]) by laurent.telenet-ops.be with bizsmtp id tqeg2500U2aSKa101qegEA; Tue, 14 Sep 2021 16:38:43 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mQ9a4-004VGk-3G; Tue, 14 Sep 2021 16:38:40 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mQ9a2-0028yN-J2; Tue, 14 Sep 2021 16:38:38 +0200 From: Geert Uytterhoeven To: Robin van der Gracht , Miguel Ojeda , Rob Herring , Paul Burton Cc: Greg Kroah-Hartman , Pavel Machek , Marek Behun , devicetree@vger.kernel.org, linux-leds@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v6 05/19] auxdisplay: img-ascii-lcd: Convert device attribute to sysfs_emit() Date: Tue, 14 Sep 2021 16:38:21 +0200 Message-Id: <20210914143835.511051-6-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210914143835.511051-1-geert@linux-m68k.org> References: <20210914143835.511051-1-geert@linux-m68k.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the "message" device attribute from sprintf() to sysfs_emit(), as the latter is aware of the PAGE_SIZE buffer. Signed-off-by: Geert Uytterhoeven --- v6: - No changes, v5: - No changes, v4: - No changes, v3: - No changes, v2: - No changes. --- drivers/auxdisplay/img-ascii-lcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii-lcd.c index 2b6e41ec57544faa..2b5640b638900a90 100644 --- a/drivers/auxdisplay/img-ascii-lcd.c +++ b/drivers/auxdisplay/img-ascii-lcd.c @@ -326,7 +326,7 @@ static ssize_t message_show(struct device *dev, struct device_attribute *attr, { struct img_ascii_lcd_ctx *ctx = dev_get_drvdata(dev); - return sprintf(buf, "%s\n", ctx->message); + return sysfs_emit(buf, "%s\n", ctx->message); } /** -- 2.25.1