Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp10025lqp; Mon, 10 Jun 2024 16:06:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXKJzAe56x1YCOQpNZntMuM+XR3kbEgf1+gTYjk8n1IcpEtwk3KeKF2EX5sWwBxdojgxL9gSJYwQnv0aT6T9vYgVz4yj6UnIqVAnRqFPw== X-Google-Smtp-Source: AGHT+IF8DTNaaXPEHza2xFOLFpTsOesJ+4WfbAZe7IOX3kaGOJj4dZ5FoT7RUr853gxAcGShkJVm X-Received: by 2002:a05:6358:4425:b0:199:432b:821b with SMTP id e5c5f4694b2df-19f1fe65fafmr1545621455d.17.1718060788046; Mon, 10 Jun 2024 16:06:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718060788; cv=pass; d=google.com; s=arc-20160816; b=WjcfLPPrTCF434BUN8Z9CkZqes9v+A4bj10OdbhWFyyFsIinWYNtos2rJSsLQbc5B/ bZcG8pR5GaZG/Ked7eBISszkAS+KpuKKEgX1RHvNS7m6ra8V4s2apQIUqXQH7Li8h+Xz Zg6Vq5GCf4mQ/UdIXjVqlBKGe0QkXXj4+9YEO8DMTfySfHRRTV37H0JMD10ExwWEI68W 4LMRzykEmIJ5K71ZvShoSEThBNuZLdiKSHmuyFLB94+BeejVOm3uV0mb8z0HeCx7W+vI QWIdnR0aqLTytiFGVLNH78m1mRuLNk7vaff78hyb+n8EKiZSC0gJLDyNtb9djRSnGy5/ 9Niw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=/1Y/1ng7J+NJ/Pxck+jwlwukOV+5HqrD1XO5KGcJr80=; fh=OY70/UoAAj2gLZPSbLl0zBguRdytyLKWRIOERYVCN3w=; b=OB9Wf8vxmNEhdnwonP3CsxZnR37lMKxBczpXZRl7hHZQOlT6WbPPijWHaFzc/jMX9C PONCcnDeCnf5NBRv1KPJF6NtDB6XQe1bly4akOWjpZfIL148ySWRVRaMFkI/dYrBh3E4 +UC0jlunq6d5ycXM5IjgpzUwQykgFIW2slnl5tvN+JTlzVIagd6DzMGAoOx+Chq0buKM eFYbcVSuasPgHy+y27rs7dV0Ps4Pd1Jg50Gq2W2+YkGo01q3OzPIsLke8A4bdBV1BMW6 /28hln44biFu2Ptx5jmf0huf04gIOqE5lt3GlOK0kgMyAUeF35VxpPFpwtuWTK6Z+pt8 /UcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AE0tYdJ2; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-209037-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209037-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de276061cbsi8295901a12.538.2024.06.10.16.06.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 16:06:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209037-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AE0tYdJ2; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-209037-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209037-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3FE9AB230FD for ; Mon, 10 Jun 2024 23:05:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FC481514C0; Mon, 10 Jun 2024 23:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="AE0tYdJ2" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD6B01514C1 for ; Mon, 10 Jun 2024 23:05:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718060722; cv=none; b=l3t1WVscEWNZfGWaN2nRMJFjXmN98qaa5e38w71JZBi/Zmo3kDBqk3X5L6TCc0Bs3IG5uvNDREJuekxr/ExaE/JstK2ZktURz1HD6y9PuIt+yoG5so7Gd55BLakv75kehud2+BmIypgR/fx4gnC0r9wBKrXtcN2OCjqITr2OaK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718060722; c=relaxed/simple; bh=0iAQrERYxy8ofmSmW1ynsHwEiXbQ2uB33xUNEsgQzSY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=i5t5qiBrrGMxd5MiFRcP8erSlH8Q8sUmmgdGzZxLRUByg4CgSPY5Sa/hso+OerQyX8ORD6gcu27yj3C5j6cAB5EoPdXz2w3Kl5RB1OSs2sIbYMovQ4DK3t4PtGwDN0Y2j4W5d9+gKUPC3n6ISPb9iNAQDDhcELB5n3jI2vkpAxI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=AE0tYdJ2; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-52bd48cf36bso3715192e87.3 for ; Mon, 10 Jun 2024 16:05:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1718060719; x=1718665519; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/1Y/1ng7J+NJ/Pxck+jwlwukOV+5HqrD1XO5KGcJr80=; b=AE0tYdJ2BZkVFw6kuSTDLRFwWCFrf+OEpqptDrYDmSsVdqCm031I+jIlgWlZJBaz3S efwV/dLjigrLYxOF/zIu/snGHE0lIfJ7hsptCWRnhzNRfv+HUwzExnRZH7wlWj8aUkqs nEYTHh0R0p25lfrQe6lQ4lGJqfs2+8gutPBxw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718060719; x=1718665519; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/1Y/1ng7J+NJ/Pxck+jwlwukOV+5HqrD1XO5KGcJr80=; b=VpISHGHBkCfcyY8GCVJS3WJUiz60azwrlP6uUjQ26TG9kergXBgYIocsJvVyiqOVPl EXsZHE79QZEFunyGSw+YrIFr80bzzlRDA7QuUC2jmrzFNEZWDJ5rM72yBKmPVIDD23LR FR8Q8wuPOfPvnSgrKFJQdZjDFw537KM4aWzu3Zt/RGjvgcOkFsbn2cXpvlwWhsBnN2qp P0NoMfjXitjMhAmx8GYD4Jqk5DBANDXi6hFp5EhxZ8Reve7fwOlaDPJM/2xKIocfzK/T eWyTDfFmpc9LhcXMuppBHgdSyVc2A5H5xg8qhgNfSPXED7fI5oHUX7hvszPVhCbZM2dp wb8w== X-Forwarded-Encrypted: i=1; AJvYcCWoxYH2eQm3dCX3a3HyXqZ5ILq3F14YksmSRv3J8E4BCmh1/rrUKpEBTuWmpOSkDXqTgzefaS0Hr1sa0vuC1L+uUIjHe/v3H87ZUPAn X-Gm-Message-State: AOJu0Yycu6T+EaeVQWY+38mhfp87r88nrhPye4/kkyV545YZEkh1ZQ0q FktvQX8rjAs4DuO1LrUUD2lZyhVDS4XVB5hj0TFYeJLlro1kb3lm6fV0T3n901JflM6EWNLWptK AL8H+ X-Received: by 2002:a05:6512:3ca1:b0:52c:859f:9f77 with SMTP id 2adb3069b0e04-52c859fa036mr3564110e87.19.1718060718837; Mon, 10 Jun 2024 16:05:18 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52c93ffa8f7sm74857e87.239.2024.06.10.16.05.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Jun 2024 16:05:18 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-52bc1261e8fso3667166e87.0 for ; Mon, 10 Jun 2024 16:05:17 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVzhUay9Vk0vslEraebAzHyE0glhvHeeOLlgeodEZb2qD2+/nVKUahD4sFn67/JM7qaZrNR+jIla+a0SSMX99qTjPeC7iAj9ogcokzl X-Received: by 2002:a05:6512:324f:b0:52b:fc90:acdc with SMTP id 2adb3069b0e04-52bfc90ae01mr4654385e87.32.1718060717297; Mon, 10 Jun 2024 16:05:17 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240318-billion-v1-0-2f7bc0ee2030@chromium.org> <20240318-billion-v1-2-2f7bc0ee2030@chromium.org> <20240610152046.GJ26663@pendragon.ideasonboard.com> In-Reply-To: <20240610152046.GJ26663@pendragon.ideasonboard.com> From: Ricardo Ribalda Date: Tue, 11 Jun 2024 01:05:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/5] media: uvcvideo: Refactor Power Line Frequency limit selection To: Laurent Pinchart Cc: Mauro Carvalho Chehab , Sergey Senozhatsky , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Hi Laurent On Mon, 10 Jun 2024 at 17:21, Laurent Pinchart wrote: > > +static int __uvc_ctrl_add_mapping(struct uvc_video_chain *chain, > > + struct uvc_control *ctrl, const struct uvc_control_mapping *mapping); > > I wonder if we could avoid the forward declaration by turning the > .add_mapping() operation into a .filter_mapping() (name to be > bikshedded) that would return a replacement mapping instead of adding > it. The caller (the __uvc_ctrl_add_custom_mapping() function) would then > call __uvc_ctrl_add_mapping() unconditionally. You could actually call > the new operation directly in __uvc_ctrl_add_custom_mapping() without > having to add a new __uvc_ctrl_add_custom_mapping() function. What do > you think, would that be simpler and more redable ? Let me add it as a forward patch, let me know what you think. Regards!