Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp981611pxk; Thu, 10 Sep 2020 04:05:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6UZu0zw3GhtBHOfhGvORNuw/QL27x0ar3OM8DxIR6sZDeSpIasRdIfGTLI1khwn1y4N+l X-Received: by 2002:aa7:d991:: with SMTP id u17mr8820340eds.11.1599735908372; Thu, 10 Sep 2020 04:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599735908; cv=none; d=google.com; s=arc-20160816; b=ZhaWQLtu3PBLl2cIB+LnVzx8/Q+44V+BOWX/uVIB3tPgWj5rwdbVgvcb9g9ROhAlHG mJtC+4apFIABdpKPIboWuUesad6swF17uH96QdpZ0jEDuHC8yEIHFBcXx0eB0pB6irpR xxYS7mVdT8DcpGh0Lf9ZwL6z6A6MrpQQPgpnPugPoGYECxmlZC3NROiFxatykRYvp/jG Z1tjOCoT+2cnLpBYKb5J0Fv/B1XFbpi4hL/Uuvf1HB8QoybB/8ex/gfixIrymZsW0Yf9 u+WaDGRdwAAKdNEJI+CNH8gOyLgYQAsmdvQnExJzQsp2QErUNN2vvbAYn9pIpmZTHhei 06zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=YgXBtSBP0UMGKfZ5Kks76k9ZUNVxHXLDGwg7ZTPYxUc=; b=iKKuP+z0UQyIQBjGauoRRjtpcdA9JOWxAoKTfjPLKERcnYR8ueFtEceK4n9U6QuhKq XJTyAP2azXmVrte83FPx+0rs2BinDdkf/m3B3MvLqOgiTwfymRx345I/3KRUUWlAqyQi CM4WUAR9QaROmNimlU2VZEbxvkU7Um6BSO6gn8VUQ4hFMLxjnWG04qIWOjb9uTfXMcrj oPpVUUMArmGcAC2AcIAFHOc0pEGpQ/O6gRzHI43FcA5d47cNQ4LTmCP+Mfvkk+pwoNYP Cb/7nxvC85LwYx231RpJ/x9lVXNLxdu1nzYn9Pw9D+EB1FUfSG8yD4OI7A8EIKUKMmwi ge6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=d15TB85S; 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=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i7si3491268edg.600.2020.09.10.04.04.45; Thu, 10 Sep 2020 04:05:08 -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=@alien8.de header.s=dkim header.b=d15TB85S; 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=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730565AbgIJLDW (ORCPT + 99 others); Thu, 10 Sep 2020 07:03:22 -0400 Received: from mail.skyhub.de ([5.9.137.197]:35348 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730504AbgIJLAq (ORCPT ); Thu, 10 Sep 2020 07:00:46 -0400 Received: from zn.tnic (p200300ec2f133200fd9e4f04ab274470.dip0.t-ipconnect.de [IPv6:2003:ec:2f13:3200:fd9e:4f04:ab27:4470]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E413B1EC04D1; Thu, 10 Sep 2020 13:00:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1599735618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=YgXBtSBP0UMGKfZ5Kks76k9ZUNVxHXLDGwg7ZTPYxUc=; b=d15TB85SEN/OgnKd9nb5gmxu9tqYB8oZMF4loy/tXTr4eG/8UJOFl15dsWbolViYlfniQk 7P+DkV3WMSS+Ujf22HZkKbxmCTPjXmpmVN1mNAyc08khx1p4UTgX3NxfrZururT5wqEVEe m27QL2Cr7lGhdQwcWvPYq6v9laJbeyo= Date: Thu, 10 Sep 2020 13:00:12 +0200 From: Borislav Petkov To: Xiongfeng Wang Cc: mchehab@kernel.org, tony.luck@intel.com, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] EDAC/mc_sysfs: add missing newlines when printing 'max(dimm)_location' Message-ID: <20200910110012.GD8357@zn.tnic> References: <1599207563-41819-1-git-send-email-wangxiongfeng2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1599207563-41819-1-git-send-email-wangxiongfeng2@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 04, 2020 at 04:19:23PM +0800, Xiongfeng Wang wrote: > When I cat 'max_location' and 'dimm_location' by sysfs, it displays as > follows. It's better to add a newline for easy reading. > > [root@localhost /]# cat /sys/devices/system/edac/mc/mc0/max_location > memory 3 [root@localhost /]# cat /sys/devices/system/edac/mc/mc0/dimm0/dimm_location > memory 0 [root@localhost /]# Please use this commit message for your next version: EDAC/mc_sysfs: Add missing newlines when printing {max,dimm}_location Reading those sysfs entries gives: [root@localhost /]# cat /sys/devices/system/edac/mc/mc0/max_location memory 3 [root@localhost /]# cat /sys/devices/system/edac/mc/mc0/dimm0/dimm_location memory 0 [root@localhost /]# Add newlines after the value it prints for better readability. > @@ -821,6 +825,7 @@ static ssize_t mci_max_location_show(struct device *dev, > edac_layer_name[mci->layers[i].type], > mci->layers[i].size - 1); > } > + p += sprintf(p, "\n"); No size checking here? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette