Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp119883pxb; Fri, 20 Aug 2021 20:56:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWJj4c/yhfWdJSUoH4VncfuH5QGmfx/u9B2+742hC9B4Dk3ghzp5MicSOm4HH8vjilR0cd X-Received: by 2002:a92:c0ce:: with SMTP id t14mr15990405ilf.72.1629518186882; Fri, 20 Aug 2021 20:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629518186; cv=none; d=google.com; s=arc-20160816; b=EEpMCXR728UCF+HaK+gcHrSHnfMuOK5jINVmKucrnccvmKOMc1IC3YBzygmmcWmvQR IgxXMk8YMHn6fhNfIqBNjUZcNrnjOPWz8wiQbMZueo0rvDBgt7cJZMtKEWdEfXHJfJ4k OCvCfb85FwiCP69acczU559QKm7CEPmvQM8vgNnSlw8K4cB84brsrHWgSSOnwcrteola qR+jUxtYNOzKAJPNrIn5nwwZ2gTDyAAVn8S3DagKSUk6BpUX/RK/yCyQvLTdbqh7/H5p pTbzENHKNQlmPDWokUqrZi9DUluBJwfytaKy06pxNK4lngwA3ze3aBkiDD/WCuuR0gvE sMZA== 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=gPVMfJmF5apelHRJsHy850+Wr5DdBmlIDaqFUXSeNXo=; b=0NrKSYlIEekp34VYnofN8QjywiD7XTuymamtor3g3XbLpgb1hvZC89WhcPcy/JQPFi u5Fq0lyRvUFfa+uJJ9zNsbdc7gK43r+tCOWO/bWMeJ8P+qWFZQA3gg19WpbpRZo7k0p3 hyLAsFqKtEwCfu7IBXKvScJKunkQkA84s1sNuGnaGugLzgR9DZdmt12Tt06/1Mr2MzTU YuBBtCCaIZy69/ly3UCRYnmm+tYIhClZyBPEGR1Qq7sZEEFEMHeu/80SN1d9U8Y35KAa HQIeOXKGsV0aO9cMrGa6FADtQVtN1FMy/OxRaEPL36+94R5epeKicBEIbKymSmv9i/6h nb2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Yc0Wk8KK; 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 b4si9733473ile.87.2021.08.20.20.56.15; Fri, 20 Aug 2021 20:56:26 -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=20161025 header.b=Yc0Wk8KK; 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 S232384AbhHUDyq (ORCPT + 99 others); Fri, 20 Aug 2021 23:54:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbhHUDyq (ORCPT ); Fri, 20 Aug 2021 23:54:46 -0400 Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75009C061575; Fri, 20 Aug 2021 20:54:07 -0700 (PDT) Received: by mail-qk1-x72a.google.com with SMTP id t66so13096990qkb.0; Fri, 20 Aug 2021 20:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gPVMfJmF5apelHRJsHy850+Wr5DdBmlIDaqFUXSeNXo=; b=Yc0Wk8KKOSVZezqoSGs9GlVp/OUlVXPEDqWGxea9T/DaFFD3QYTjJb7HxabEJjxyjn H+MlOz1JGtO/hl8iqnDLpr9Y3oprEf0CIMLKE+WPmKhx1qACS58pXM43SyMGLSISexX0 Qzo4hAphyRJDgVRBlQ9DG4PC6jGDtwKkySpximippebGr7W9NEfx47J9xuOi1GS3nMFe NESdaXbS6W/yEjwGDbBeffZOgZO8/F7lYZbYU9/nyHTvEjwHuMH5BR1zjIe9I10DZsZM QrPfQ3Y5jgSufYLmspK9PpRZxHnjkJUx9UaRl8Y5cTP9i5JWSRE7cZaU7CkY4cJbYWa9 kduw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gPVMfJmF5apelHRJsHy850+Wr5DdBmlIDaqFUXSeNXo=; b=rKwz5rwJF0wn8gksZjpdo3LOICpKBjTtuiZT4SRCTXQNtM7iuuC0hfwrd6j/4uXnro yQwE1WdpteE4xrfO7YnkP+/qhUcyleSOCj2DOdwmhmuftljpirBWdaZnKolCcFwBfHtB PL0vKzmm9Ui8g01sxat25/HjAuL7Jv/JvhHiZRf+Ek/Bo4UXWl73ug/K+82NWZwlUXd9 cecWp8jm92kprFhzgUEAiUBuNmzbNUkU6om+8RrQDt+3UdYyLbbv4oQNIuF1l8GR7FHH SncI40Yd+rQNUU9AhXSDnFEL4u3XMBBXMZnTgA2qm7eezJn7Acd3Vran7kBxS7NO/8wt +3hA== X-Gm-Message-State: AOAM530lBFsMcwouPoNmIbee4s+kSlJSGU58UlA330Y7v5xuRCy3T5F+ S5e0KkzxyJ69Spt7ILLBks5CQS38ctxunQ== X-Received: by 2002:a37:a592:: with SMTP id o140mr12060620qke.220.1629518046730; Fri, 20 Aug 2021 20:54:06 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id f12sm3434230qtj.40.2021.08.20.20.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 20:54:06 -0700 (PDT) From: CGEL X-Google-Original-From: CGEL To: Heiko Carstens Cc: Vasily Gorbik , Christian Borntraeger , Vineeth Vijayan , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, jing yangyang , Zeal Robot Subject: [PATCH linux-next] s390:raw3270: Convert sysfs sprintf/snprintf family to sysfs_emit Date: Fri, 20 Aug 2021 20:53:58 -0700 Message-Id: <20210821035358.28350-1-jing.yangyang@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 yangyang Fix the following coccicheck warning: ./drivers/s390/char/raw3270.c:1066:8-16: WARNING: use scnprintf or sprintf ./drivers/s390/char/raw3270.c:1050:8-16: WARNING:use scnprintf or sprintf ./drivers/s390/char/raw3270.c:1058:8-16: WARNING:use scnprintf or sprintf Reported-by: Zeal Robot Signed-off-by: jing yangyang --- drivers/s390/char/raw3270.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 646ec79..be8529f 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c @@ -1047,7 +1047,7 @@ struct raw3270_view * static ssize_t raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf) { - return snprintf(buf, PAGE_SIZE, "%i\n", + return sysfs_emit(buf, "%i\n", ((struct raw3270 *) dev_get_drvdata(dev))->model); } static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL); @@ -1055,7 +1055,7 @@ struct raw3270_view * static ssize_t raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) { - return snprintf(buf, PAGE_SIZE, "%i\n", + return sysfs_emit(buf, "%i\n", ((struct raw3270 *) dev_get_drvdata(dev))->rows); } static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL); @@ -1063,7 +1063,7 @@ struct raw3270_view * static ssize_t raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf) { - return snprintf(buf, PAGE_SIZE, "%i\n", + return sysfs_emit(buf, "%i\n", ((struct raw3270 *) dev_get_drvdata(dev))->cols); } static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL); -- 1.8.3.1