From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lothar =?UTF-8?B?V2HDn21hbm4=?= Subject: Re: [PATCH V6 4/7] OF: properties: Implement get_match_data() callback Date: Thu, 7 Dec 2017 16:20:36 +0100 Message-ID: <20171207162036.6a71a4f5@karo-electronics.de> References: <1512493493-6464-1-git-send-email-okaya@codeaurora.org> <1512493493-6464-5-git-send-email-okaya@codeaurora.org> <20171207141029.575c0a03@karo-electronics.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sinan Kaya Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, open list , linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Frank Rowand , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-arm-msm@vger.kernel.org Hi, On Thu, 7 Dec 2017 09:45:31 -0500 Sinan Kaya wrote: > On 12/7/2017 8:10 AM, Lothar Waßmann wrote: > >> +void *of_fwnode_get_match_data(const struct fwnode_handle *fwnode, > >> + struct device *dev) > > Shouldn't this be 'const void *of_fwnode_get_match_data > > OF keeps the driver data as a (const void*) internally. ACPI keeps the > driver data as kernel_ulong_t in struct acpi_device_id. > > I tried to find the middle ground here by converting output to void* > but not keeping const. > It should be no problem to cast a (const void *) to an unsigned long data type (without const qualifier). Lothar Waßmann -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754709AbdLGPUp convert rfc822-to-8bit (ORCPT ); Thu, 7 Dec 2017 10:20:45 -0500 Received: from smtprelay09.ispgateway.de ([134.119.228.114]:33912 "EHLO smtprelay09.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753676AbdLGPUn (ORCPT ); Thu, 7 Dec 2017 10:20:43 -0500 Date: Thu, 7 Dec 2017 16:20:36 +0100 From: Lothar =?UTF-8?B?V2HDn21hbm4=?= To: Sinan Kaya Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, timur@codeaurora.org, open list , linux-acpi@vger.kernel.org, Rob Herring , dmaengine@vger.kernel.org, Frank Rowand , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V6 4/7] OF: properties: Implement get_match_data() callback Message-ID: <20171207162036.6a71a4f5@karo-electronics.de> In-Reply-To: References: <1512493493-6464-1-git-send-email-okaya@codeaurora.org> <1512493493-6464-5-git-send-email-okaya@codeaurora.org> <20171207141029.575c0a03@karo-electronics.de> Organization: Ka-Ro electronics GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Df-Sender: bHdAa2Fyby1lbGVjdHJvbmljcy5kZQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, 7 Dec 2017 09:45:31 -0500 Sinan Kaya wrote: > On 12/7/2017 8:10 AM, Lothar Waßmann wrote: > >> +void *of_fwnode_get_match_data(const struct fwnode_handle *fwnode, > >> + struct device *dev) > > Shouldn't this be 'const void *of_fwnode_get_match_data > > OF keeps the driver data as a (const void*) internally. ACPI keeps the > driver data as kernel_ulong_t in struct acpi_device_id. > > I tried to find the middle ground here by converting output to void* > but not keeping const. > It should be no problem to cast a (const void *) to an unsigned long data type (without const qualifier). Lothar Waßmann From mboxrd@z Thu Jan 1 00:00:00 1970 From: LW@KARO-electronics.de (Lothar =?UTF-8?B?V2HDn21hbm4=?=) Date: Thu, 7 Dec 2017 16:20:36 +0100 Subject: [PATCH V6 4/7] OF: properties: Implement get_match_data() callback In-Reply-To: References: <1512493493-6464-1-git-send-email-okaya@codeaurora.org> <1512493493-6464-5-git-send-email-okaya@codeaurora.org> <20171207141029.575c0a03@karo-electronics.de> Message-ID: <20171207162036.6a71a4f5@karo-electronics.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On Thu, 7 Dec 2017 09:45:31 -0500 Sinan Kaya wrote: > On 12/7/2017 8:10 AM, Lothar Wa?mann wrote: > >> +void *of_fwnode_get_match_data(const struct fwnode_handle *fwnode, > >> + struct device *dev) > > Shouldn't this be 'const void *of_fwnode_get_match_data > > OF keeps the driver data as a (const void*) internally. ACPI keeps the > driver data as kernel_ulong_t in struct acpi_device_id. > > I tried to find the middle ground here by converting output to void* > but not keeping const. > It should be no problem to cast a (const void *) to an unsigned long data type (without const qualifier). Lothar Wa?mann