Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3499867pxf; Mon, 22 Mar 2021 07:51:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjUSSu56/Fp8yrZNVNw43rNSfDUadkjGyRzqjvA+sMMd32BZJ2RWysJ550LAzR3PQs9jEu X-Received: by 2002:a05:6402:34d:: with SMTP id r13mr26172006edw.64.1616424717992; Mon, 22 Mar 2021 07:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616424717; cv=none; d=google.com; s=arc-20160816; b=j4wmAP61hw3zBQA313s53JRZhOG2/tL/S75DbWO/tHiGV/Qlc9rC36UFT+Lm1XSkfK sj1l/uswzBP5DCLwb4lGIT4MlcgumBM9dxn/4ojEMTNrnJatnFDU571Aloehw9xzk933 jR3INunXTE57NNxB4UKmzFdUwMSs/sApSPOQjP2ejlSO9QaUcDI2x07fjRGvgnNFMZAZ OBiLcr5dMnWhpcMQxusFR3oTn2AKOSd0XJFbUoK/RxqEyrFaEV9QWDMfVdyjgJvq9Y+k ZaHxUndPzlkxGpPB8NCSEoP72+LtZ6MRHr9jVSvRj7GGcqL+R7Ycpi5RPU7hDfoqdqGX jXzA== 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=GWtYGboese2+pMvktYrYTDLyGw/Rb94yN9/GOvS9dKY=; b=V0CP1nlKg9Yzv8WmarbcRmwg4f6UcEAzhvBO3Pu/A1gn9aK/bAVmX/pdIFD6DvDbky 9tvHmoRvlGSeBhIpc72OgswgVDO2WYx6x9rsQCJoZ0qkJ4igHJBsDSDj1FV6oje8s1Py jleQSOOm1aaTw3rL7oFZorHOnntuxt3nkIyu97ee3c0bxKmuTzmGBsfxg5PderOEp9Vo B1rzmkjsC2Ohb8HpLuJhB6/wbwkymmwIq+kJXlwA56r9aXGOmIvfn8huC0foaLB/AYCO H/+ful822pW85KHLjub8MRQXOmReiZCIOp7Xom4OuMViO49MZ0qqZGGWOACeDzNEIDZz AeDA== 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 b68si12500133edf.477.2021.03.22.07.51.35; Mon, 22 Mar 2021 07:51:57 -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 S230087AbhCVOuZ (ORCPT + 99 others); Mon, 22 Mar 2021 10:50:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbhCVOtB (ORCPT ); Mon, 22 Mar 2021 10:49:01 -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 C9A40C0613A6 for ; Mon, 22 Mar 2021 07:48:55 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:250b:f16c:c5e2:505d]) by laurent.telenet-ops.be with bizsmtp id jSot2400Y2HDxaV01SotgG; Mon, 22 Mar 2021 15:48:53 +0100 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 1lOLrQ-009ZWE-VH; Mon, 22 Mar 2021 15:48:52 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1lOLrP-004T5v-IE; Mon, 22 Mar 2021 15:48:51 +0100 From: Geert Uytterhoeven To: Robin van der Gracht , Rob Herring , Miguel Ojeda , Paul Burton , Greg Kroah-Hartman Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 05/17] auxdisplay: img-ascii-lcd: Convert device attribute to sysfs_emit() Date: Mon, 22 Mar 2021 15:48:36 +0100 Message-Id: <20210322144848.1065067-6-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210322144848.1065067-1-geert@linux-m68k.org> References: <20210322144848.1065067-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 --- 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