Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7767624ybi; Tue, 9 Jul 2019 04:05:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfxdBJvtGFj9jYJIf5EklQsJc1j7DMvjMfAHwe+UHyoOvJW9OPXEvjKANSk+yWyxRMhUE8 X-Received: by 2002:a17:90a:8a8e:: with SMTP id x14mr31332264pjn.103.1562670336304; Tue, 09 Jul 2019 04:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562670336; cv=none; d=google.com; s=arc-20160816; b=Y0SWKLoO05F7Le22+rFVn/FKcsIzkdz5avHJGum1nUbiBkYA6mUhMezZchSD2W7D1V YWDwp0+WqvvT6R1368gR1HDW7O706n6SqZSXJYtSQvMGbU5E+4uypckBs/xi+VB62el5 DwqgO9Cae9xmybmqUBgWWggNfMkayuBalbkspUUrEEo7Xb2EF5PxU+vbBl6XpwoqVS3p Qi3+MZtKVgj7EgEKeymlnRllmDvsO8RJ98C0/g34zg88MznDdjTfkO+De3l/p2YsSAon CEcFPHUPzNy4RTCZt9i8l6Y2gXTD1AqQKpRIECUnFIw2r7xhNgppkzixcHmXJFb3ymz7 lIGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=FMJEzTCAPWq9BYGA0wXEs1vocglVfN8Tlz/V4lS1OfE=; b=leOg/LRolJfjcSGBsV6PK+FTy1EUxkvXO7CKToKO8WY0XZDMrLe6Av3RPsudmHKbzU hpDrMIGecvd/MZkBn4a0bRzH2XiLvzXlUpf7tzqWyUV52zZBpT96sCm634Sam8NuPglk mjVNjAa7WbrkdVJ/T+rf+WwFKmxGoEA0m1g1xmxQBUgDWmxFhKxR80KTvi23aHfkPWuK H1oEl38wGONiRPd3Ps3B3j09L6Lx7uoZ1t4CQ3v82adGqqdapGt8Slnn4cmqoMknaBk4 PQW8K9+XA/zAKcJjNEfi2tMDkX2pjQnyB6w2qFG1DGTYmPN+BiXjTzvHuucGxq3pEyja ZP2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=BOPS402W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12si17726937pfg.260.2019.07.09.04.05.18; Tue, 09 Jul 2019 04:05:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=BOPS402W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726887AbfGILBP (ORCPT + 99 others); Tue, 9 Jul 2019 07:01:15 -0400 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:44219 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfGILBO (ORCPT ); Tue, 9 Jul 2019 07:01:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1562670074; x=1594206074; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=FMJEzTCAPWq9BYGA0wXEs1vocglVfN8Tlz/V4lS1OfE=; b=BOPS402WtIgEXuGGqPOpCG/uDfBrkqpnIRtWJTA/YdY7BfFvA/jQKndX NLYAm72XFn1HwlzrrwmAZReA6fYrFd+kSwF2gwoZ4/BYHERAC3OInzwei AOc+7ZuyYEMV0lqwFu3T1GXG7Jf4ME+JwOpFFjA+ytOzLYQ07U1Y9Mhgh k=; X-IronPort-AV: E=Sophos;i="5.62,470,1554768000"; d="scan'208";a="740972077" Received: from iad6-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-2a-22cc717f.us-west-2.amazon.com) ([10.124.125.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 09 Jul 2019 11:01:11 +0000 Received: from EX13MTAUWA001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2a-22cc717f.us-west-2.amazon.com (Postfix) with ESMTPS id 839CCA2066; Tue, 9 Jul 2019 11:01:10 +0000 (UTC) Received: from EX13D13UWA004.ant.amazon.com (10.43.160.251) by EX13MTAUWA001.ant.amazon.com (10.43.160.118) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 9 Jul 2019 11:01:10 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX13D13UWA004.ant.amazon.com (10.43.160.251) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 9 Jul 2019 11:01:10 +0000 Received: from [10.107.3.17] (10.107.3.17) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 9 Jul 2019 11:01:05 +0000 Subject: Re: [PATCH v2 2/4] edac: Add support for Amazon's Annapurna Labs L1 EDAC To: Jonathan Cameron CC: , , , , , , , , , , , , , , , , , , References: <1562500658-14717-1-git-send-email-hhhawa@amazon.com> <1562500658-14717-3-git-send-email-hhhawa@amazon.com> <20190709173229.0000135f@huawei.com> From: "Hawa, Hanna" Message-ID: <45e9ac35-9ffc-8f5f-cbdb-f85453227363@amazon.com> Date: Tue, 9 Jul 2019 14:01:03 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190709173229.0000135f@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/9/2019 12:32 PM, Jonathan Cameron wrote: >> Signed-off-by: Hanna Hawa > A quick drive by review as I was feeling curious. > > Just a couple of trivial queries and observation on the fact it > might be useful to add a few devm managed functions to cut down > on edac driver boilerplate. > > Thanks, > > Jonathan > >> +#define ARM_CA57_CPUMERRSR_VALID GENMASK(31, 31) > For a single bit it's common to use BIT(31) rather than GENMASK to make > it explicit. Will fix. > > >> + edac_dev->mod_name = dev_name(dev); > I'd admit I'm not that familiar with edac, but seems odd that a > module name field would have the dev_name. Will fix when I got more inputs. > >> + edac_device_free_ctl_info(edac_dev); > More a passing observation than a suggestion for this driver, but if there was > ever a place where it looked like a couple of devm_ allocation functions would > be useful, this is it;) > > edac_dev = devm_device_alloc_ctrl_info(dev, ...) > ... > devm_edac_device_add_device(dev, ...) I agree. I can implement the devm_* functions in separate patches as this is not related to my patches (and not to delay this patches). > >