Message ID | 20230119115503.268693-3-umang.jain@ideasonboard.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp287582wrn; Thu, 19 Jan 2023 04:05:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXv9q5JJ/Ustj1XADZHLHtm+44iw4y3ern+Ygx8uhcs1suuUZAq1PlJB1TpW4qSWm3XePaZE X-Received: by 2002:a17:903:1306:b0:189:5f5c:da1e with SMTP id iy6-20020a170903130600b001895f5cda1emr9592474plb.27.1674129908583; Thu, 19 Jan 2023 04:05:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674129908; cv=none; d=google.com; s=arc-20160816; b=BGEiBYFRgnT6yy+dIoqq/lBN5hUdTIUEDVK5YxSJQb6dZVmZGL6Sp/v6FjGMSFAyxM XDfKmmesbIZPn6XtnKdv3NxM/rxYBr2AC9GEp7LMit64Js+JImRLqeHtM0EhKO/5+ctt HprCx43azARTbmDgeV1viIWbmJ9ssPGdaHt5Bz4NFI6ZRRjARSamkKJAnx1p7UCyg3q8 RQupAAXLf3c68VJPikLQw3YQqC0F+koulQWNYVZM+Nr9eHvgr/RKRf7l+x7caVrIzeRN 1GLVkmMrbgGNEA9SGAvFwg31kU2DID0jL+NcFkMyAxGzrriSUNESu8z91B/8u+F6SKJF PV1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wg1MGjN/8lrIs1pcbfAri80EyTSCWpzmXuJNRpoaxAI=; b=hla1OwciAoM3r+RHjy62PJUYMxjLVz1isik3DzrjRwkAI3e9CzArmkzGAUgNIXKHLH XocJEeaf+iMSUautqN/jCYwI6wkOqiq4esO2FVySgXwUf7fT5LCG3JkCtlrqaovqYN6f TixNm7erMhmAT8908sc7NiAy4I/D9d+50YqDKjr3oW5OsqRK88P1VxcW8PM4/KOPNIVH gvwXMsMuKqGYj4/1wyCLWX1U+yKI7BQzHYURqPt05zVp/s422ur6NH+JqLUvPqOg/ofO Y/rKRQllXc2Qdm1O+8b2TCFOTglZdeDOwB/9eB3/qDrAZGoF77CBRHxSD0Mk1wgr5/xg 3LcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=DCsS7rQ6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a170903228e00b00194a01b7317si6676073plh.58.2023.01.19.04.04.55; Thu, 19 Jan 2023 04:05:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=DCsS7rQ6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231205AbjASLzq (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Thu, 19 Jan 2023 06:55:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231164AbjASLzi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 19 Jan 2023 06:55:38 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2E5269233; Thu, 19 Jan 2023 03:55:35 -0800 (PST) Received: from ideasonboard.com (unknown [IPv6:2401:4900:1c80:b229:a6c1:a673:925f:1ed6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 943172B3; Thu, 19 Jan 2023 12:55:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674129334; bh=l2Z+aymU3GBOZ/9Ymt+5NaTPuUL7aItEHHCi8zu3jgY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DCsS7rQ6T1pZDoZDxzOyys+08pLlv9aZeBwu6IAazmEVQmXJIBnx8bk6BCcdyu8FV aamfNQlJpdUiRgIRUqHx56fXQqvjANIGY5tu8DBs6Yh8qotVFQLFXx44BFcamOpl2D OEeuG55Lypk1PPY0k6Whs/bCqmRXK7NyQ7oMH20o= From: Umang Jain <umang.jain@ideasonboard.com> To: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stefan Wahren <stefan.wahren@i2se.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Florian Fainelli <f.fainelli@gmail.com>, Adrien Thierry <athierry@redhat.com>, Dan Carpenter <error27@gmail.com>, Dave Stevenson <dave.stevenson@raspberrypi.com>, Kieran Bingham <kieran.bingham@ideasonboard.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Paul Elder <paul.elder@ideasonboard.com>, Umang Jain <umang.jain@ideasonboard.com> Subject: [PATCH v5 2/6] staging: vc04_services: bcm2835-audio: Drop include Makefile directive Date: Thu, 19 Jan 2023 17:24:59 +0530 Message-Id: <20230119115503.268693-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119115503.268693-1-umang.jain@ideasonboard.com> References: <20230119115503.268693-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755452442994205437?= X-GMAIL-MSGID: =?utf-8?q?1755452442994205437?= |
Series |
staging: vc04_services: vchiq: Register devices with a custom bus_type
|
|
Commit Message
Umang Jain
Jan. 19, 2023, 11:54 a.m. UTC
Drop the include directive they can break the build one only wants to
build a subdirectory. Replace with "../" for the includes, in the
bcm2835.h instead.
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
---
drivers/staging/vc04_services/bcm2835-audio/Makefile | 2 --
drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 3 ++-
2 files changed, 2 insertions(+), 3 deletions(-)
Comments
Hi Umang, Thank you for the patch. On Thu, Jan 19, 2023 at 05:24:59PM +0530, Umang Jain wrote: > Drop the include directive they can break the build one only wants to > build a subdirectory. Replace with "../" for the includes, in the > bcm2835.h instead. I assume you meant Drop the include directive. They can break the build, when one only wants to build a subdirectory. > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> > --- > drivers/staging/vc04_services/bcm2835-audio/Makefile | 2 -- > drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 3 ++- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/staging/vc04_services/bcm2835-audio/Makefile b/drivers/staging/vc04_services/bcm2835-audio/Makefile > index fc7ac6112a3e..01ceebdf88e7 100644 > --- a/drivers/staging/vc04_services/bcm2835-audio/Makefile > +++ b/drivers/staging/vc04_services/bcm2835-audio/Makefile > @@ -1,5 +1,3 @@ > # SPDX-License-Identifier: GPL-2.0 > obj-$(CONFIG_SND_BCM2835) += snd-bcm2835.o > snd-bcm2835-objs := bcm2835.o bcm2835-ctl.o bcm2835-pcm.o bcm2835-vchiq.o > - > -ccflags-y += -I $(srctree)/$(src)/../include The reason for this, I assume, is that the driver is in staging. The vchiq.h file should live in include/linux/raspberrypi/, not drivers/staging/vc04_services/include/linux/raspberrypi/, so an additional include directory is added in order to use #include <linux/raspberrypi/vchiq.h> When the code will get out of staging, vchiq.h will go to include/linux/raspberrypi/, the extra include directory will be dropped, and all will be well without having to change any source file. With this patch, we'll have to undo the change below to drivers/staging/vc04_services/bcm2835-audio/bcm2835.h when vc04_services will get out of staging. Greg, is that what you prefer ? > diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h > index 38b7451d77b2..0a81383c475a 100644 > --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h > +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h > @@ -6,11 +6,12 @@ > > #include <linux/device.h> > #include <linux/wait.h> > -#include <linux/raspberrypi/vchiq.h> > #include <sound/core.h> > #include <sound/pcm.h> > #include <sound/pcm-indirect.h> > > +#include "../include/linux/raspberrypi/vchiq.h" > + > #define MAX_SUBSTREAMS (8) > #define AVAIL_SUBSTREAMS_MASK (0xff) >
On Fri, Jan 20, 2023 at 03:28:05AM +0200, Laurent Pinchart wrote: > Hi Umang, > > Thank you for the patch. > > On Thu, Jan 19, 2023 at 05:24:59PM +0530, Umang Jain wrote: > > Drop the include directive they can break the build one only wants to > > build a subdirectory. Replace with "../" for the includes, in the > > bcm2835.h instead. > > I assume you meant > > Drop the include directive. They can break the build, when one only > wants to build a subdirectory. > > > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> > > --- > > drivers/staging/vc04_services/bcm2835-audio/Makefile | 2 -- > > drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 3 ++- > > 2 files changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/staging/vc04_services/bcm2835-audio/Makefile b/drivers/staging/vc04_services/bcm2835-audio/Makefile > > index fc7ac6112a3e..01ceebdf88e7 100644 > > --- a/drivers/staging/vc04_services/bcm2835-audio/Makefile > > +++ b/drivers/staging/vc04_services/bcm2835-audio/Makefile > > @@ -1,5 +1,3 @@ > > # SPDX-License-Identifier: GPL-2.0 > > obj-$(CONFIG_SND_BCM2835) += snd-bcm2835.o > > snd-bcm2835-objs := bcm2835.o bcm2835-ctl.o bcm2835-pcm.o bcm2835-vchiq.o > > - > > -ccflags-y += -I $(srctree)/$(src)/../include > > The reason for this, I assume, is that the driver is in staging. The > vchiq.h file should live in include/linux/raspberrypi/, not > drivers/staging/vc04_services/include/linux/raspberrypi/, so an > additional include directory is added in order to use > > #include <linux/raspberrypi/vchiq.h> > > When the code will get out of staging, vchiq.h will go to > include/linux/raspberrypi/, the extra include directory will be dropped, > and all will be well without having to change any source file. > > With this patch, we'll have to undo the change below to > drivers/staging/vc04_services/bcm2835-audio/bcm2835.h when vc04_services > will get out of staging. > > Greg, is that what you prefer ? I prefer the drivers to NOT use include ccflags in the kernel as it breaks the build when trying to build just a subdirectory. If/when this code ever gets out of staging, then the include lines can be fixed up to point to the correct location of wherever the files move to. So I like this patch, but as I couldn't take the first one, this and the rest did not apply so I'll wait for them to be resubmitted. thanks, greg k-h
diff --git a/drivers/staging/vc04_services/bcm2835-audio/Makefile b/drivers/staging/vc04_services/bcm2835-audio/Makefile index fc7ac6112a3e..01ceebdf88e7 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/Makefile +++ b/drivers/staging/vc04_services/bcm2835-audio/Makefile @@ -1,5 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_SND_BCM2835) += snd-bcm2835.o snd-bcm2835-objs := bcm2835.o bcm2835-ctl.o bcm2835-pcm.o bcm2835-vchiq.o - -ccflags-y += -I $(srctree)/$(src)/../include diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h index 38b7451d77b2..0a81383c475a 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h @@ -6,11 +6,12 @@ #include <linux/device.h> #include <linux/wait.h> -#include <linux/raspberrypi/vchiq.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/pcm-indirect.h> +#include "../include/linux/raspberrypi/vchiq.h" + #define MAX_SUBSTREAMS (8) #define AVAIL_SUBSTREAMS_MASK (0xff)