From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06131C83F1A for ; Wed, 30 Aug 2023 19:03:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235997AbjH3S72 (ORCPT ); Wed, 30 Aug 2023 14:59:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245548AbjH3Pce (ORCPT ); Wed, 30 Aug 2023 11:32:34 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A373E113 for ; Wed, 30 Aug 2023 08:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=OPL8u2tYhafX1T0TmTcgkVAU76Ovegl3zNy3Djwca5g=; b=ZC0YSJBFx2ZYgxj/yw1hxG2s7M Wa+o3m4yOf4Ybcc3LdRvMiUPtzGphdtDD/kDFafWTYvkKYXHRxP0rQWPLfLxkqqzLx+aKQ6JnGC/c YaeDkQrpLsMzbFKD4hdZT0yAbfdUbbs6dngHIbN0ElBrLCjc1GMvMBEZF1CQtSmjAK247YBgYNWyE vfnbvSNM8nT8jBQK0Y8cCRmuOq45l16MjDvgQHQmOzLU9uSMZgt+UmDmmkYAUhuGRYEzgoECGgPfu 7fzITpIoDui3q/4+EPftilG1uGxh5F6y+NWM/j1VlssXLxfbxmbI0xZqOW+tAOp09/ok+jq5RDE92 zHkA71sg==; Received: from [2601:1c2:980:9ec0::2764] by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qbNBE-00Dlbm-2K; Wed, 30 Aug 2023 15:32:28 +0000 Message-ID: <7630bbd0-3296-be21-df90-bb12477b6893@infradead.org> Date: Wed, 30 Aug 2023 08:32:27 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH] macintosh/ams: linux/platform_device.h is needed Content-Language: en-US To: Christophe Leroy , "linux-kernel@vger.kernel.org" Cc: Rob Herring , "linuxppc-dev@lists.ozlabs.org" References: <20230829225837.15520-1-rdunlap@infradead.org> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 8/29/23 22:46, Christophe Leroy wrote: > > > Le 30/08/2023 à 00:58, Randy Dunlap a écrit : >> ams.h uses struct platform_device, so the header should be used >> to prevent build errors: >> >> drivers/macintosh/ams/ams-input.c: In function 'ams_input_enable': >> drivers/macintosh/ams/ams-input.c:68:45: error: invalid use of undefined type 'struct platform_device' >> 68 | input->dev.parent = &ams_info.of_dev->dev; >> drivers/macintosh/ams/ams-input.c: In function 'ams_input_init': >> drivers/macintosh/ams/ams-input.c:146:51: error: invalid use of undefined type 'struct platform_device' >> 146 | return device_create_file(&ams_info.of_dev->dev, &dev_attr_joystick); >> drivers/macintosh/ams/ams-input.c: In function 'ams_input_exit': >> drivers/macintosh/ams/ams-input.c:151:44: error: invalid use of undefined type 'struct platform_device' >> 151 | device_remove_file(&ams_info.of_dev->dev, &dev_attr_joystick); >> drivers/macintosh/ams/ams-input.c: In function 'ams_input_init': >> drivers/macintosh/ams/ams-input.c:147:1: error: control reaches end of non-void function [-Werror=return-type] >> 147 | } >> >> Fixes: 233d687d1b78 ("macintosh: Explicitly include correct DT includes") >> Signed-off-by: Randy Dunlap >> Cc: Rob Herring >> Cc: linuxppc-dev@lists.ozlabs.org >> Cc: Michael Ellerman >> --- >> drivers/macintosh/ams/ams.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff -- a/drivers/macintosh/ams/ams.h b/drivers/macintosh/ams/ams.h >> --- a/drivers/macintosh/ams/ams.h >> +++ b/drivers/macintosh/ams/ams.h >> @@ -6,6 +6,7 @@ >> #include >> #include >> #include >> +#include > > You modify ams.h to fix a problem in ams-input.c > Is that correct ? > struct platform_device is used in ams.h so I think the change needs to be there. > Shouldn't the include be in ams-input.c instead ? > >> #include >> #include >> > > Christophe -- ~Randy