Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2998727pxb; Sun, 3 Oct 2021 11:43:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaMQW1CpkWr1A8RL85vuf2UZ44P3N7YAig67C5/boGvoMuzKitA/ApJ2IlWDO1wdqku+Fl X-Received: by 2002:a17:90a:890a:: with SMTP id u10mr25791019pjn.40.1633286635380; Sun, 03 Oct 2021 11:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633286635; cv=none; d=google.com; s=arc-20160816; b=g69a/sh7ybEX+Xszf8i1rblxxQJ82Fy70UJJVAFmdOAAE5purR+Svbosfb9Pq2OzyX 89dXUv8gZbdLjjwYdbM2/09oIv4mTVnFZ0BWkuoNRXOSrQ25wV7RCNnxzYz/eignHvVt dnOZouvY/eWulg2A0Lgcj1y1Jr9h2nNNdI+gcmyctpwZ7p2DIkSsxivbjA2I/iFeqKky 4SItOtFl3xGj7+10Gy2Szh+tGGHISqy4gwXC+x+5CiYbkeNyslmL8sInHQOaEIKcN7t2 9bpQ3cQwDjUUs1OVezUei/QsuKqIr+vwiVwUIfS1e+KK5H4sdrrZebCT+sS1tCU51oI0 fRbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=GQhMyogHN7y8nehFLIZCJ9ROYU/DzWV4+WI3lnHC9VE=; b=g2F1FhVO286cUxmOBaB4EhN0o950LNx7Ql8cbpzpyRxCvAiyoQBq3GLWS5vCPvKrmC itbORlL2D8ahKYlRzj6Ns183nOyb02UlM7CCGs2bD/f1ygNIoWlKj6SkGFubXToRZYsQ mL7YIXhxmJsNjCln+58OQDPHhtMlHrlyuEyn2nTkzywowjMDBBzyxB3tOb6hdD3oh4aG 9R/ZGqGMi2Yuxf4DwL2It2JsYBG6am674RgYsYloO0nAjCdwxTIoNgz+KCTSO0IjTig4 h00yGFmJbsU1JFBj/gWwfbFeOm9qzQhn3AaZfKJY+/i54JhtnzJjmM7HdrtGJNpgjMgN jIGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@purestorage.com header.s=google header.b=HJXXYtLI; 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=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k15si22967232plk.302.2021.10.03.11.43.42; Sun, 03 Oct 2021 11:43:55 -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=@purestorage.com header.s=google header.b=HJXXYtLI; 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=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231296AbhJCSSp (ORCPT + 99 others); Sun, 3 Oct 2021 14:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231389AbhJCSSo (ORCPT ); Sun, 3 Oct 2021 14:18:44 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D836C0613EC for ; Sun, 3 Oct 2021 11:16:57 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id r201so8524947pgr.4 for ; Sun, 03 Oct 2021 11:16:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=GQhMyogHN7y8nehFLIZCJ9ROYU/DzWV4+WI3lnHC9VE=; b=HJXXYtLIklgXaY1BKE1WVSZvqJvgRFJ2bq1B/kZyIKmuyJio1QqAerURv3BoGAPnBP iFO1Q69rFetDZXN0JzSr5DJVZ7BI8+AlXG1hz+3f9vlBS48Tjk45M0iLdVaYND48Ctnk RugsYl8YFR9fUC6fv9pL/2LGvUNSedKbeNlZ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=GQhMyogHN7y8nehFLIZCJ9ROYU/DzWV4+WI3lnHC9VE=; b=fh3a1tGPWIU6d6/RxdZ04+Zaca8rU0Tl6VN+iD2mV5IhwPYk3YH+HYhqG8ctngdT7V Bmb8TbkOP4jxgUp5FRsCAeoBGDRLftV+O4+/CMAAkangYRNO7vq9sXP9n60LXAIE9Zl1 RB07pAU7Nu4quQZ2/EGlwWZxiDRhUHRsZbpBzjKfmmB83Ed3So9YWOpT22/mzzYWDT+7 IQamPmqlVma9Zxx+FXIiME6QoxkM0FaT4IDI3HNQ2tbSF85xTzMoWI3Z28hEPoLmNg4o PxYQNOMIdxUilx3zqGRqeFVkKr5nXn7fJhsnvZi+frHKNA+pDEcBmFDENTXXUdoKo3LR 6ezQ== X-Gm-Message-State: AOAM533o0DbCzwLC7IiXTd7ISgMuetWiGlfWbKXdcoQYml7raDiNuEoY 0o/DG1aMRL9w8h+84aCjrOqYjaTW0vIcihLX X-Received: by 2002:a63:e516:: with SMTP id r22mr7622020pgh.197.1633285016627; Sun, 03 Oct 2021 11:16:56 -0700 (PDT) Received: from ebadger-ThinkPad-T590 (cpe-75-80-179-40.san.res.rr.com. [75.80.179.40]) by smtp.gmail.com with ESMTPSA id j7sm11028777pjf.18.2021.10.03.11.16.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 11:16:56 -0700 (PDT) Date: Sun, 3 Oct 2021 11:16:53 -0700 From: Eric Badger To: ebadger@purestorage.com Cc: Eric Badger , Borislav Petkov , Mauro Carvalho Chehab , Tony Luck , James Morse , Robert Richter , "open list:EDAC-CORE" , open list Subject: [PATCH] EDAC/mc_sysfs: Print MC-scope sysfs counters unsigned Message-ID: <20211003181653.GA685515@ebadger-ThinkPad-T590> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is cosmetically nicer for counts > INT32_MAX, and aligns the MC-scope format with that of the lower layer sysfs counter files. Signed-off-by: Eric Badger --- drivers/edac/edac_mc_sysfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 2f9f1e7..0a638c9 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c @@ -744,7 +744,7 @@ static ssize_t mci_ue_count_show(struct device *dev, { struct mem_ctl_info *mci = to_mci(dev); - return sprintf(data, "%d\n", mci->ue_mc); + return sprintf(data, "%u\n", mci->ue_mc); } static ssize_t mci_ce_count_show(struct device *dev, @@ -753,7 +753,7 @@ static ssize_t mci_ce_count_show(struct device *dev, { struct mem_ctl_info *mci = to_mci(dev); - return sprintf(data, "%d\n", mci->ce_mc); + return sprintf(data, "%u\n", mci->ce_mc); } static ssize_t mci_ce_noinfo_show(struct device *dev, @@ -762,7 +762,7 @@ static ssize_t mci_ce_noinfo_show(struct device *dev, { struct mem_ctl_info *mci = to_mci(dev); - return sprintf(data, "%d\n", mci->ce_noinfo_count); + return sprintf(data, "%u\n", mci->ce_noinfo_count); } static ssize_t mci_ue_noinfo_show(struct device *dev, @@ -771,7 +771,7 @@ static ssize_t mci_ue_noinfo_show(struct device *dev, { struct mem_ctl_info *mci = to_mci(dev); - return sprintf(data, "%d\n", mci->ue_noinfo_count); + return sprintf(data, "%u\n", mci->ue_noinfo_count); } static ssize_t mci_seconds_show(struct device *dev, -- 1.9.1