Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5164715rdb; Wed, 13 Dec 2023 00:09:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnubulZk2mM7tTlCo2UzpKBMJ9LNyF0U/fIcGRZVmnnmmonHshFdQ22gFjrCjmjCQMHaRt X-Received: by 2002:a05:6808:13d3:b0:3b9:edd3:951d with SMTP id d19-20020a05680813d300b003b9edd3951dmr9380190oiw.36.1702454965615; Wed, 13 Dec 2023 00:09:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702454965; cv=none; d=google.com; s=arc-20160816; b=XKS950Tobsxcvm/C1RLIMpeAiS7PDAaeQWtEjKdnbAQpwmeTNz1VQi6ELH1lo4nj3T zEmqw0UXVtgk8QyZDXIhgl3vSjn1PPOe1Hqfu3IzP4+iB25Zi837iB9wPvgQ75SDpCAw PEGKNhMMir8Z4VeyzSyBr846lc9cReR0XDcNxBQR/dQyHB/b8WDc+ISwkiuoPqEGUrE5 k3dF7GOeNzMutd1V2fMOU9um7KAMEygcgzP4SGX98+pevgAAWKaCEeGw+goxCYS7T/6Z /iQz0WePWZzYiUiWOhjwXBWXhjgS5c7aWe/q4Mekc+Lxc58qgJWStXPvxiSKa0maALAH b/MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=szBYEui7BaKxPiqPrIMXzxP6eiSxAXRKBGxp4JAtIO4=; fh=USulhy/5pgbuTJQeaTUI+1ii50sve9LpBskFirQLujs=; b=mIkdg/dY8inMVIuR1ttKZBsMS3/s728VwrwbURa/CaIQbF3QPsKoabxi+F11Z0nkUS AaCZKcJnoAXEag4BBqQ+IUaGQ20hSRgFDn909Tt5V4o0wrH2skTZYkV7c0LXpnCFmXXm VhQBDMyzwxgyG4zwGsqfePo1csmLvdsiHy1freLH2oW/kgnCDrnaBSx0KSkutOUa5sMO 1Nnoe55VY83arO5/C6W9OYtiAcw/3Y+X14LPbk6PERzGhPAHn43A350nzP25uqZ8E3I3 bXs5ammDPIHIqlZAnZV0HBWT8dmEq5uJ/HL9yL0hEQ2QzAEyxB0ZNjL0WrbykZBkx1gz rUJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZZ+bSEYT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id a11-20020a65640b000000b0056949ba3f3fsi9193381pgv.253.2023.12.13.00.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 00:09:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZZ+bSEYT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id A94498132A6E; Wed, 13 Dec 2023 00:09:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378760AbjLMIJF (ORCPT + 99 others); Wed, 13 Dec 2023 03:09:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378750AbjLMIJE (ORCPT ); Wed, 13 Dec 2023 03:09:04 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B83E4B2; Wed, 13 Dec 2023 00:09:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702454950; x=1733990950; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=rMiaJC8fgXzWBq5kjwXOvMEA3/jbQN1IRhkx7p5yyeY=; b=ZZ+bSEYToSIFTSiAIhY1VyxczpJCLyhYdbMqpH09RW8sW0qCCV3pGg+q lU8iCTFbNOz4kGexFuelPYE+MIsay9xHCldwsr7UnMy/gx0TapX2b32O+ AYXIit1fXAOc1ij+8ylKTtR394tXEL/mffwS8B41QsbIuyGGHOocL4k1K C3GM2tgIiBtEWlkOoDi7c4J7hV6f2Q9NYoZ6J2HsI8sRrLF0mv/HPrIOI neCeF0uUs09C0S5U6ezhMkwowCGiEvNLhj7zuboLxke9Sv6FUoR8ffIJY +4J4wmscB5gZDY04PIOLIcYn3HrtQAX58MH63Gr4CZ/2qe7eo8PbR8NTV w==; X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="392103661" X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="392103661" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 00:09:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="750025415" X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="750025415" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 00:09:05 -0800 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with SMTP id E8FCC11FC21; Wed, 13 Dec 2023 10:09:02 +0200 (EET) Date: Wed, 13 Dec 2023 08:09:02 +0000 From: Sakari Ailus To: Arnd Bergmann Cc: Mauro Carvalho Chehab , Nathan Chancellor , Jacopo Mondi , Hans Verkuil , Laurent Pinchart , Arnd Bergmann , Nick Desaulniers , Bill Wendling , Justin Stitt , Hans de Goede , Tomi Valkeinen , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] media: i2c: mt9m114: add CONFIG_COMMON_CLK dependency Message-ID: References: <20231212213625.3653558-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231212213625.3653558-1-arnd@kernel.org> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Dec 2023 00:09:22 -0800 (PST) Hi Arnd, On Tue, Dec 12, 2023 at 10:18:04PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > With clang-16, building without COMMON_CLK triggers a range check on > udelay() because of a constant division-by-zero calculation: > > ld.lld: error: undefined symbol: __bad_udelay > >>> referenced by mt9m114.c > >>> drivers/media/i2c/mt9m114.o:(mt9m114_power_on) in archive vmlinux.a > > Avoid this by adding a Kconfig dependency that avoids the broken build. This sounds like an odd way to fix an issue with udelay(). On which arch does it happen? Wouldn't it be better to fix the udelay() problem in the source? A quick check reveals there are about 2400 files using udelay. > > Fixes: 24d756e914fc ("media: i2c: Add driver for onsemi MT9M114 camera sensor") > Signed-off-by: Arnd Bergmann > --- > drivers/media/i2c/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig > index aae05142e191..b224c37bfd77 100644 > --- a/drivers/media/i2c/Kconfig > +++ b/drivers/media/i2c/Kconfig > @@ -228,6 +228,7 @@ config VIDEO_MT9M111 > > config VIDEO_MT9M114 > tristate "onsemi MT9M114 sensor support" > + depends on COMMON_CLK > select V4L2_CCI_I2C > help > This is a Video4Linux2 sensor-level driver for the onsemi MT9M114 -- Regards, Sakari Ailus