Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1931888rwn; Fri, 16 Sep 2022 03:08:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4NR/SpcfeUPh+h8M2g6+ja/fj8yb+KAR5jQQ2Kvj3+FrOm1gcBrh8uD0N6KJgydkHHlrA1 X-Received: by 2002:a17:906:9b92:b0:780:1f91:30fc with SMTP id dd18-20020a1709069b9200b007801f9130fcmr3207827ejc.142.1663322936117; Fri, 16 Sep 2022 03:08:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663322936; cv=none; d=google.com; s=arc-20160816; b=EoXD5TqSNmoF0GEJQXMKN6nU3iiq9SA4LvJxEZHLp6cR9tCJP/7ZAcdM4N6hLZa3Pb G4LbpncKHf6CBhuMf2QlIfLx00dp5ttg72ufyc+KkfJkEbUBxDKT1JS7hflYP0mFuuMl yys9mDx259mHJGYLg2gz6xQol3yi9XZvCibOQ+DJ4v0u7BM3ThySyTnpaU6J6wZ6tfIA wmxvmylS4CetuuAPl8NdQxONtGK4VEetB+ImS1Gk5LkPmct7Gh7WhDhJOP28jZaMKGts ZcRhije/KlrNj92HyXr3TtCqhw3BI1WjVZQiR8cIp9QqbVLPBQYcrN07zlZbWNgaxYr+ ioOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=NzvsBv6Vy0LayQRu2srUUWCYs5DHNCpJ/APAQxxwdIQ=; b=QgK/tqxl1kBC5kC1pp/jKH34NvP42vP3istf/PRyshkmFoP400Q+EaMzB3Lqb020yW IBLhusVRjdIj+88kDFOnG2mO4MJ8K/eOePtZG+i5Yr2Wjqk05bDcmwhcAacPwM3RyPl9 /Hs+YPCPf98aYBgkFm6x1jLT+fj9Dqj86oCl48x3KxYrw/UVRQIZDDv/kOHeD7E6LVfr ud+nOpGuLGfJWOpKz2O+21Cgg7Tk8kQUrcFGgZUQMyYv4+r7EJR4Fn9eAEBgQ31yYZqW lfgE7pN5iG44u5F+cm3+AmhmUJdGrPEmAX3nsskgvCzf/w4uRV6/5EPfEvG+iA99tbdD G1OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vsk0YFgW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv17-20020a17090760d100b0073da4a0f01csi3469979ejc.743.2022.09.16.03.08.30; Fri, 16 Sep 2022 03:08:56 -0700 (PDT) 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 header.i=@linaro.org header.s=google header.b=Vsk0YFgW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbiIPJoH (ORCPT + 99 others); Fri, 16 Sep 2022 05:44:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230292AbiIPJno (ORCPT ); Fri, 16 Sep 2022 05:43:44 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7FBBAA4DB for ; Fri, 16 Sep 2022 02:43:13 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id b5so35084897wrr.5 for ; Fri, 16 Sep 2022 02:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=NzvsBv6Vy0LayQRu2srUUWCYs5DHNCpJ/APAQxxwdIQ=; b=Vsk0YFgWXXN9oDQ0nv4Fbq8khNFKpoFKDiz32x8/+RlDM898xvgKkiI/s2uTFd72tL Rc1fYGbNQ8s62o3LfYTb8ZAg4Eq7SONzTs3WcQxwWAjgSDWxq5xGzk++3ap/aN93zkbC bR7eE44twUV83Xatg35B5jfLjhODPmBlAwUkh8q1cOYUBJTDkGr+Y1n+S3QeSjjKXpXV EYePLWJtPTUmDw0MSnMMR2by90MLyzTUkqSTQWm3PrX4Jy7lH2ufEbiHcrsMYKcLyhE7 fEbrtUUBmvMaIkpr6s8QkRXffpXGkCv/IpETvo6lE/k3r2nKrQz3b6VDFCys292qSxFA uJBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=NzvsBv6Vy0LayQRu2srUUWCYs5DHNCpJ/APAQxxwdIQ=; b=lEU4d14qpTrHVA2gqjnA58Rs5W6AEsC355BtGWgucAtXzM60IpMuGDREWH/jbXXa18 GJRHdTF+TQQ/EpVEf0uCUtsLQoQxf88ePeRi4fMlAyl2647/Ha0QVX7QB+QFm6n6HESx BX1RB/ukWS3TCkS0lu+kmyaaK6cgut4fmaCit9pS0vUjLi+bElVi7X9YJ9vDuTr7XtxC ZaT/9n20CsI0/rkYlB+rrub034ikwAtfBZd0G3bu9zKQ4VqnmIKGOgyJYm7Gyd4Jr3A8 s+RGJIRPhkIm4XmzVe9tmn+HdgnEo8rZGlKAAcnXEWrbLtQAXyO9svWQcHK1MoCBC6AW Asxg== X-Gm-Message-State: ACrzQf17zQVlYmJy9lprfhrPEk2HDZX/giIHhW6V1Int3bHxHak6Kv8Y NFLfSRQ1VP0Wl7ki0b+htAp3Hw== X-Received: by 2002:a05:6000:2c9:b0:22a:c481:20b with SMTP id o9-20020a05600002c900b0022ac481020bmr2349981wry.7.1663321392356; Fri, 16 Sep 2022 02:43:12 -0700 (PDT) Received: from [10.119.22.201] ([89.101.193.73]) by smtp.gmail.com with ESMTPSA id j16-20020a05600c1c1000b003b492338f45sm1779049wms.39.2022.09.16.02.43.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Sep 2022 02:43:11 -0700 (PDT) Message-ID: Date: Fri, 16 Sep 2022 10:43:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v2 2/2] media: i2c: add support for ov4689 Content-Language: en-US To: Mikhail Rudenko Cc: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Sakari Ailus , Hans Verkuil , Jacopo Mondi , Shawn Tu , Randy Dunlap , Daniel Scally , Christian Hemp , Laurent Pinchart , Marek Vasut , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220911200147.375198-1-mike.rudenko@gmail.com> <20220911200147.375198-3-mike.rudenko@gmail.com> <87o7vgpa50.fsf@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <87o7vgpa50.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,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: X-Mailing-List: linux-kernel@vger.kernel.org On 15/09/2022 21:40, Mikhail Rudenko wrote: > > Hi Krzysztof, > > On 2022-09-12 at 12:56 +02, Krzysztof Kozlowski wrote: >> On 11/09/2022 22:01, Mikhail Rudenko wrote: >>> +static const struct i2c_device_id ov4689_id[] = { >>> + { "ov4689", 0 }, >>> + {}, >>> +}; >>> +MODULE_DEVICE_TABLE(i2c, ov4689_id); >>> + >>> +static const struct of_device_id ov4689_of_match[] = { >>> + { .compatible = "ovti,ov4689" }, >>> + {}, >>> +}; >>> +MODULE_DEVICE_TABLE(of, ov4689_of_match); >>> + >>> +static struct i2c_driver ov4689_i2c_driver = { >>> + .driver = { >>> + .name = "ov4689", >>> + .pm = &ov4689_pm_ops, >>> + .of_match_table = of_match_ptr(ov4689_of_match), >> >> of_match_ptr is usually paired with maybe_unused, otherwise you will >> have compile test warnings. > > I see. I think we could also use `#if IS_ENABLED(CONFIG_OF)` around > `ov4689_of_match` and the corresponding `MODULE_DEVICE_TABLE`. Is it > appropriate here? Would work, but ifdefs are not nice. Just use maybe_unused. Warnings should disappear. Best regards, Krzysztof