From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com ([134.134.136.20]:48508 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbeDQSVQ (ORCPT ); Tue, 17 Apr 2018 14:21:16 -0400 Subject: Re: [PATCH v3 06/10] drivers/peci: Add a PECI adapter driver for Aspeed AST24xx/AST25xx To: Robin Murphy , Alan Cox , Andrew Jeffery , Andrew Lunn , Andy Shevchenko , Arnd Bergmann , Benjamin Herrenschmidt , Fengguang Wu , Greg KH , Guenter Roeck , Haiyue Wang , James Feist , Jason M Biils , Jean Delvare , Joel Stanley , Julia Cartwright , Miguel Ojeda , Milton Miller II , Pavel Machek , Randy Dunlap , Stef van Os , Sumeet R Pawnikar , Vernon Mauery Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20180410183212.16787-1-jae.hyun.yoo@linux.intel.com> <20180410183212.16787-7-jae.hyun.yoo@linux.intel.com> <93e7f93c-a2e4-1e16-be4c-b908f88b9897@arm.com> From: Jae Hyun Yoo Message-ID: <684d1e9e-b07d-ef79-4333-e47d11326e7f@linux.intel.com> Date: Tue, 17 Apr 2018 11:21:13 -0700 MIME-Version: 1.0 In-Reply-To: <93e7f93c-a2e4-1e16-be4c-b908f88b9897@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-hwmon-owner@vger.kernel.org List-Id: linux-hwmon@vger.kernel.org Hi Robin, On 4/17/2018 6:37 AM, Robin Murphy wrote: > Just a drive-by nit: > > On 10/04/18 19:32, Jae Hyun Yoo wrote: > [...] >> +#define PECI_CTRL_SAMPLING_MASK     GENMASK(19, 16) >> +#define PECI_CTRL_SAMPLING(x)       (((x) << 16) & >> PECI_CTRL_SAMPLING_MASK) >> +#define PECI_CTRL_SAMPLING_GET(x)   (((x) & PECI_CTRL_SAMPLING_MASK) >> >> 16) > > FWIW, already provides functionality like this, so it > might be worth taking a look at FIELD_{GET,PREP}() to save all these > local definitions. > > Robin. Yes, that looks better. Thanks a lot for your pointing it out. Jae From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jae Hyun Yoo Subject: Re: [PATCH v3 06/10] drivers/peci: Add a PECI adapter driver for Aspeed AST24xx/AST25xx Date: Tue, 17 Apr 2018 11:21:13 -0700 Message-ID: <684d1e9e-b07d-ef79-4333-e47d11326e7f@linux.intel.com> References: <20180410183212.16787-1-jae.hyun.yoo@linux.intel.com> <20180410183212.16787-7-jae.hyun.yoo@linux.intel.com> <93e7f93c-a2e4-1e16-be4c-b908f88b9897@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <93e7f93c-a2e4-1e16-be4c-b908f88b9897@arm.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Robin Murphy , Alan Cox , Andrew Jeffery , Andrew Lunn , Andy Shevchenko , Arnd Bergmann , Benjamin Herrenschmidt , Fengguang Wu , Greg KH , Guenter Roeck , Haiyue Wang , James Feist , Jason M Biils , Jean Delvare , Joel Stanley , Julia Cartwright , Miguel Ojeda , Milton Miller II , Pavel Machek , Randy Dunlap Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org Hi Robin, On 4/17/2018 6:37 AM, Robin Murphy wrote: > Just a drive-by nit: > > On 10/04/18 19:32, Jae Hyun Yoo wrote: > [...] >> +#define PECI_CTRL_SAMPLING_MASK     GENMASK(19, 16) >> +#define PECI_CTRL_SAMPLING(x)       (((x) << 16) & >> PECI_CTRL_SAMPLING_MASK) >> +#define PECI_CTRL_SAMPLING_GET(x)   (((x) & PECI_CTRL_SAMPLING_MASK) >> >> 16) > > FWIW, already provides functionality like this, so it > might be worth taking a look at FIELD_{GET,PREP}() to save all these > local definitions. > > Robin. Yes, that looks better. Thanks a lot for your pointing it out. Jae From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-5.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham autolearn_force=no version=3.4.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 20D7F7E27E for ; Tue, 17 Apr 2018 18:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751232AbeDQSVR (ORCPT ); Tue, 17 Apr 2018 14:21:17 -0400 Received: from mga02.intel.com ([134.134.136.20]:48508 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbeDQSVQ (ORCPT ); Tue, 17 Apr 2018 14:21:16 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2018 11:21:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,464,1517904000"; d="scan'208";a="192236637" Received: from yoojae-mobl1.amr.corp.intel.com (HELO [10.7.153.150]) ([10.7.153.150]) by orsmga004.jf.intel.com with ESMTP; 17 Apr 2018 11:21:14 -0700 Subject: Re: [PATCH v3 06/10] drivers/peci: Add a PECI adapter driver for Aspeed AST24xx/AST25xx To: Robin Murphy , Alan Cox , Andrew Jeffery , Andrew Lunn , Andy Shevchenko , Arnd Bergmann , Benjamin Herrenschmidt , Fengguang Wu , Greg KH , Guenter Roeck , Haiyue Wang , James Feist , Jason M Biils , Jean Delvare , Joel Stanley , Julia Cartwright , Miguel Ojeda , Milton Miller II , Pavel Machek , Randy Dunlap , Stef van Os , Sumeet R Pawnikar , Vernon Mauery Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20180410183212.16787-1-jae.hyun.yoo@linux.intel.com> <20180410183212.16787-7-jae.hyun.yoo@linux.intel.com> <93e7f93c-a2e4-1e16-be4c-b908f88b9897@arm.com> From: Jae Hyun Yoo Message-ID: <684d1e9e-b07d-ef79-4333-e47d11326e7f@linux.intel.com> Date: Tue, 17 Apr 2018 11:21:13 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <93e7f93c-a2e4-1e16-be4c-b908f88b9897@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org Hi Robin, On 4/17/2018 6:37 AM, Robin Murphy wrote: > Just a drive-by nit: > > On 10/04/18 19:32, Jae Hyun Yoo wrote: > [...] >> +#define PECI_CTRL_SAMPLING_MASK     GENMASK(19, 16) >> +#define PECI_CTRL_SAMPLING(x)       (((x) << 16) & >> PECI_CTRL_SAMPLING_MASK) >> +#define PECI_CTRL_SAMPLING_GET(x)   (((x) & PECI_CTRL_SAMPLING_MASK) >> >> 16) > > FWIW, already provides functionality like this, so it > might be worth taking a look at FIELD_{GET,PREP}() to save all these > local definitions. > > Robin. Yes, that looks better. Thanks a lot for your pointing it out. Jae -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: jae.hyun.yoo@linux.intel.com (Jae Hyun Yoo) Date: Tue, 17 Apr 2018 11:21:13 -0700 Subject: [PATCH v3 06/10] drivers/peci: Add a PECI adapter driver for Aspeed AST24xx/AST25xx In-Reply-To: <93e7f93c-a2e4-1e16-be4c-b908f88b9897@arm.com> References: <20180410183212.16787-1-jae.hyun.yoo@linux.intel.com> <20180410183212.16787-7-jae.hyun.yoo@linux.intel.com> <93e7f93c-a2e4-1e16-be4c-b908f88b9897@arm.com> Message-ID: <684d1e9e-b07d-ef79-4333-e47d11326e7f@linux.intel.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Robin, On 4/17/2018 6:37 AM, Robin Murphy wrote: > Just a drive-by nit: > > On 10/04/18 19:32, Jae Hyun Yoo wrote: > [...] >> +#define PECI_CTRL_SAMPLING_MASK???? GENMASK(19, 16) >> +#define PECI_CTRL_SAMPLING(x)?????? (((x) << 16) & >> PECI_CTRL_SAMPLING_MASK) >> +#define PECI_CTRL_SAMPLING_GET(x)?? (((x) & PECI_CTRL_SAMPLING_MASK) >> >> 16) > > FWIW, already provides functionality like this, so it > might be worth taking a look at FIELD_{GET,PREP}() to save all these > local definitions. > > Robin. Yes, that looks better. Thanks a lot for your pointing it out. Jae