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 X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 039EDC43381 for ; Thu, 14 Mar 2019 10:18:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C3EFE2064A for ; Thu, 14 Mar 2019 10:18:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="les9NheX"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MET8aMZe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3EFE2064A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:In-reply-to:Subject:To: From:References:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=f8GwTUnLzwEecWlUNkj9wxf66AV0589XmUHiSyhhQs4=; b=les9NheXix9p3FTLpb+bTzEZn 4ebxU1NfURJAxQM6muEkk4F56v6PhIdVIkl5V6N3IRKc1wkpBUTRgITBzpN11VfDXvj8QqgLOM2pV TcU+Gm2Mu0BEXm878kspuHuKo2xf6rxQ1ajCXAzzorRzbC+OOhqtO84+xc8Kxwz1xiO3LBT4JzhSP tf0G1aOEPm6AKJos7cHX7BZlPaeVGBaVFI2WAhWAug2QFU7i0hVpu6rmb0rGZfHw+/MRapbpI7lrL rFJbsO1fjX2oWdexfC9ILzQkzzHZmgAyS93JiVsVuXuUMIa4DpZ24/8AKbGzHhwKk1fIfjWNhdwLa WVzixPNQg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4NR3-0001SH-Ia; Thu, 14 Mar 2019 10:18:01 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4NQz-0001RQ-FV for linux-arm-kernel@lists.infradead.org; Thu, 14 Mar 2019 10:17:58 +0000 Received: by mail-wr1-x444.google.com with SMTP id h99so5157194wrh.12 for ; Thu, 14 Mar 2019 03:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=ycODFwQlLZjbetO+LWi5L4TBJGCo56tWZhs5w6WEz4Y=; b=MET8aMZea4G4KF2uOFJ9x8FJYvSksZmghJtHGzdzOuh/LycLfll/li6m23kQD/jzup onTV+KwbSfK9GUAUCdrUXJifHMW4/Dl7H4D8msEvBb9uee4xckU6fgMx7vKDY7xVrQXT Ihw7MG9jCUzd5aHIg2vy3LjKqss+MpkFGx09fjsaAb8Qqme+NQAQbRlD1ir5vfHG42df oq6HvsMlU4ize+/b6jC8JlixPqw+gMiPv/DF2cMVZOfUNMXvKTJtC7TElOCvK6JnWAYB Aa8CrUGV3g0DV/mxNOfhMiUuJnnEuCrYevGjN/aucuZMIkJnrwGkLjBXLmHGhkvasJB6 wGkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=ycODFwQlLZjbetO+LWi5L4TBJGCo56tWZhs5w6WEz4Y=; b=B4HYJuNfkOTGgTma9SJubNaQB0iI1lOlYkE4xhAIBSCfRgEuUvraGrTsYBvGoBI1LV nE6FhRg+F6yJQ0zEPBWVtJoGSJ0MjMK6hZnIBM7mc7Urz7DL3oASZVgiq/+Vomv4iES3 yTKidcK51fQPnYM8dqR/uy0KcXMQ5vgv7Wxjoka5XF1zSrzUWGA8e0/xiW+xNUGXwjp+ rEPA54/xJ/okB1AlrdemYyfuo/vBpAQSSnEg8UQZ6rdToEMMXSM09g81w0JstLBk/LE7 o+8EKlikuZqv1cqApeuJ9NTgT1jrQRliKYKeQ6ywq7dsZEdxR2c6iHzhYQnndLYRSXS4 amJA== X-Gm-Message-State: APjAAAUFmyXvY+qDB2mUk8EfpjXOQ1ujsct7u8CT+b16VhocNAxTbeGa lO9WQLG6WpBpFUGLdpJwVm8= X-Google-Smtp-Source: APXvYqz9dfnzXpD6DCVrnlCwrgbpOMjTjFSJFVbBI5R/NbTxXcDyFBJP2oGd/cvo4SrPRtkHfFsBGA== X-Received: by 2002:adf:ebc3:: with SMTP id v3mr3740150wrn.35.1552558675377; Thu, 14 Mar 2019 03:17:55 -0700 (PDT) Received: from arch-late (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id 6sm1821873wmf.6.2019.03.14.03.17.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 03:17:54 -0700 (PDT) References: <20190313211748.534491-1-arnd@arndb.de> User-agent: mu4e 1.0; emacs 27.0.50 From: Rui Miguel Silva To: Arnd Bergmann Subject: Re: [PATCH] staging: media: imx7-mipi-csis: fix debugfs compilation In-reply-to: <20190313211748.534491-1-arnd@arndb.de> Date: Thu, 14 Mar 2019 10:17:51 +0000 Message-ID: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190314_031757_547416_BC63BEFE X-CRM114-Status: GOOD ( 18.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Fabio Estevam , Pengutronix Kernel Team , Greg Kroah-Hartman , Sascha Hauer , linux-kernel@vger.kernel.org, NXP Linux Team , Philipp Zabel , Steve Longerbeam , Hans Verkuil , Mauro Carvalho Chehab , Shawn Guo , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Arnd, Thanks for the patch. On Wed 13 Mar 2019 at 21:17, Arnd Bergmann wrote: > When CONFIG_DEBUGFS is enabled, we get a warning about an > incorrect section annotation that can lead to undefined > behavior: > > WARNING: vmlinux.o(.text+0xd3c7c4): Section mismatch in > reference from the function mipi_csis_probe() to the function > .init.text:mipi_csis_debugfs_init() > The function mipi_csis_probe() references > the function __init mipi_csis_debugfs_init(). > This is often because mipi_csis_probe lacks a __init > annotation or the annotation of mipi_csis_debugfs_init is wrong. > > The same function for an unknown reason has a different > version for !CONFIG_DEBUGFS, which does not have this problem, > but behaves the same way otherwise (it does nothing when debugfs > is disabled). > Consolidate the two versions, using the correct section from > one version, and the implementation from the other. > > Signed-off-by: Arnd Bergmann Reviewed-by: Rui Miguel Silva --- Cheers, Rui > --- > drivers/staging/media/imx/imx7-mipi-csis.c | 16 > ++-------------- > 1 file changed, 2 insertions(+), 14 deletions(-) > > diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c > b/drivers/staging/media/imx/imx7-mipi-csis.c > index 2ddcc42ab8ff..001ce369ec45 100644 > --- a/drivers/staging/media/imx/imx7-mipi-csis.c > +++ b/drivers/staging/media/imx/imx7-mipi-csis.c > @@ -9,6 +9,7 @@ > */ > > #include > +#include > #include > #include > #include > @@ -889,8 +890,6 @@ static int mipi_csis_subdev_init(struct > v4l2_subdev *mipi_sd, > return ret; > } > > -#ifdef CONFIG_DEBUG_FS > -#include > > static int mipi_csis_dump_regs_show(struct seq_file *m, void > *private) > { > @@ -900,7 +899,7 @@ static int mipi_csis_dump_regs_show(struct > seq_file *m, void *private) > } > DEFINE_SHOW_ATTRIBUTE(mipi_csis_dump_regs); > > -static int __init_or_module mipi_csis_debugfs_init(struct > csi_state *state) > +static int mipi_csis_debugfs_init(struct csi_state *state) > { > struct dentry *d; > > @@ -934,17 +933,6 @@ static void mipi_csis_debugfs_exit(struct > csi_state *state) > debugfs_remove_recursive(state->debugfs_root); > } > > -#else > -static int mipi_csis_debugfs_init(struct csi_state *state > __maybe_unused) > -{ > - return 0; > -} > - > -static void mipi_csis_debugfs_exit(struct csi_state *state > __maybe_unused) > -{ > -} > -#endif > - > static int mipi_csis_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel