Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2206817lqo; Mon, 13 May 2024 10:48:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWcnYKKw2EaAZogorINrRH11hV3WFmUDpdZyQRUbnC+8kzCwRAD02K2XDnubRBIHYYozdnT0pvxZsxrCY1jI38aMijVI3YBXYzTM2JQpg== X-Google-Smtp-Source: AGHT+IGIOQ0BE2kj6v9A0wOFAKKa+pzKs2StfarEiVDagijzmRVnU3C9/kR2TA1dkv8hGZeTIUKG X-Received: by 2002:a05:6a00:3ccd:b0:6f3:8479:290a with SMTP id d2e1a72fcca58-6f4e02cef4bmr13257517b3a.17.1715622526414; Mon, 13 May 2024 10:48:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715622526; cv=pass; d=google.com; s=arc-20160816; b=DLUXTgy/nstS8xcQe0qTva3jQErfuTCvInycbSYLrKJ5HfXsE/1bGyKd1LlsAfHj0J 9gm05JP9AdmoRFqfA6WjUl98ieqbXEharjuojCeCJB8dZF/2DYEGCot3FZ8mbgXO1r8c MDdlwWf+HUxGgFKBj+NsSCDJrhvqxbO5VpxVxo4FyeGJ0WfN+NHZeVAx1Ltc5cGKFswT FW/hGfbXp9v3fBQR4vsYSYj9SQWxgeIzlGhEMoj/LXpbNwC0FB9iEDOksLIVD/DjF4kK xAFI1tS6GFxVAJbsMiCXP9pjsDtHGqFZyz72bNE8nPzkcBfxBJhPxvtugMfbrThaBdFX Qy2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=gRY3tylgCmAliI8QRE7thGCyBV7jJo3wfys0Ur6AtsA=; fh=D+z+h04CglfxGlOjI+LTBl3zRRslSFJzg/XIT/ibNts=; b=Ghg4EE7jlOAS251r2VD3hnD8ohWyTHiW1Va3lIqjZMXIyraTrxh0hwad6S9RqOrjsD +a/aGQJ2pnYxltCIgO9GAXgAHT3DVAqlWrNZgK+FABsaiOLjuZyzTT8sVyW7Swzl/g/T jdv5PGPacpzPjxuOf8vM1h1zECVdBRWaXjx+uRSpGnhxd1SD5msdgp3QA3WdFWu3GChc 4gd9lhJgcb4e0P6c9ydY8WMy/ylCGQGMfi4H4NTVVxJgC37ZtKDRfarAikf0Z66EYTlG ezBgMp3AiB/uYXMVKE9MxPOOAN7hmVkxXHMxbvu/8kZ9We0VLZIFWi8nbR3tkkBDFib/ lrsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="bk/Gg8Oz"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-177935-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a6d817si10412215b3a.17.2024.05.13.10.48.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 10:48:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177935-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="bk/Gg8Oz"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-177935-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8C720281A60 for ; Mon, 13 May 2024 17:48:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1651429D05; Mon, 13 May 2024 17:48:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bk/Gg8Oz" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 BEEFC364D2 for ; Mon, 13 May 2024 17:48:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715622516; cv=none; b=I2QrFbPZw0IA9zlfhC9TFfnvIv4jABEVwZG/f9pjcFAteBeCa0w4qc58FKeotXAe1bzdVxafStlkCMv+mJHgGiniXNLUXp6AaZ+RcG0NYeJlBkPJSZNq3pKU0ZhG9oFiB4uxgyo0Cze0EnOVHbGW+yt+QYpY5Zm1ciKkFeDg9bM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715622516; c=relaxed/simple; bh=Qb9pI7QfawdOPDOVP3uOoIDj0eSToii5WjRsBEqNIHE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fOqqTOmxBXi+VN8SNKMY5PentZZN5NucX4SE21fnuCn+XlbLsR0XpgUjKoaw0yo26KFSaAf/WQC2zyOsliW8maTSFvuzLl7CCAJMcQpBZ2a9K9lOj5p3OmYtVkDBhI1kqVZ5N5gwhqQOlhYHEp1tcgY3XLjrW5f4NeH/WhtO6p0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=bk/Gg8Oz; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a59cf8140d0so1071328666b.3 for ; Mon, 13 May 2024 10:48:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715622513; x=1716227313; darn=vger.kernel.org; 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:message-id:reply-to; bh=gRY3tylgCmAliI8QRE7thGCyBV7jJo3wfys0Ur6AtsA=; b=bk/Gg8Oz+f9piwrkNNGwhRueQSquVpOk3rSxPgTNKprtsIz63AdTKzhCu9uSlhMESt /YYS3CD3TSv6byf0h3SOQWCa+5IpckzRS+rYFtiU2N+57yFWutvrRTeZGfKHBLZYD9i3 QH+bqcH4AXn4DIywuJ0Lxu0VPs9qcTd+WHFgrnnACGRQ/lJXHM5ZQZ3dHJ3LZseM7K5b YIrlGCUzrljVDzmypc77PGuObojSYiAuZSgs2Ve9R8YEAghQW4RmAvnCRJcmzrMM2eeq CdElxCYrsDtIb+rH4+g1MsXUeMRVSkx+GmyUmC8kvIImfNmaRU5mFfFGED3nxQrbvdeC EvEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715622513; x=1716227313; 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:message-id:reply-to; bh=gRY3tylgCmAliI8QRE7thGCyBV7jJo3wfys0Ur6AtsA=; b=jipNztB1PyNzsaN9vKbCwK/BW/0mHbXnLmcF9H+jl7drHPQKxlvh50NBqzAiU5VN+8 KyuoxYacto6gMgayiCaXdN9Mp1X3DmWjDY09akjqkoDxjvHHhewyKd1Bl1KtGiVLltdp 63I+PZhHydIlLVbcOQUcyixm2XR9TCq4pe2W2SPskDIus1sAQuEm6+PkE6rk4hzwEeZQ bHuMWgnyR+aCysieBFgadk6JoV9Qk2nBYMjzNkLBZVKbYvk21cyh7Mpa2WqlF97sEDM0 VctBWZO5NoFo8IWdXv6FjIEMV44Pj1/grtkOMflomxe6bYJaq7ZZ62W1Zk30j8J1pUp5 AaxQ== X-Forwarded-Encrypted: i=1; AJvYcCVOwmz2uX2mtEiuW7sk7yabKbUEpV7TEg7A8gs9keVvGP7AaAFWUiyR79setWV8Xb3aTMRBsm1jquQFqA8GNj1cqb+gDGKTAB3iAIQR X-Gm-Message-State: AOJu0YyX31Zpxzf9W0x3p52x8sa6xeWD9Grrt/5MNQ/zB0+4jfqwY3FN TNcvQbbEFFihoawflOHqKYmYktEzEfLbIUomvKMdZ649ynhM4Hran0KcuNSHWMI= X-Received: by 2002:a17:906:17c5:b0:a5a:1b57:426f with SMTP id a640c23a62f3a-a5a2d54c10fmr711563766b.13.1715622513191; Mon, 13 May 2024 10:48:33 -0700 (PDT) Received: from [10.1.3.28] ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a1781cf9csm620178866b.7.2024.05.13.10.48.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 May 2024 10:48:32 -0700 (PDT) Message-ID: <5bcfbb01-9650-4420-8982-af6537d7e7b5@linaro.org> Date: Mon, 13 May 2024 18:48:31 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 8/8] media: qcom: camss: Decouple VFE from CSID Content-Language: en-US To: "Gjorgji Rosikopulos (Consultant)" , Vladimir Zapolskiy , rfoss@kernel.org, todor.too@gmail.com, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com, hverkuil-cisco@xs4all.nl, quic_hariramp@quicinc.com References: <20240411124543.199-1-quic_grosikop@quicinc.com> <20240411124543.199-9-quic_grosikop@quicinc.com> From: Bryan O'Donoghue In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 13/05/2024 17:26, Gjorgji Rosikopulos (Consultant) wrote: >>> +static void __iomem >>> +*vfe_parent_dev_ops_get_base_address(struct camss *camss, int id) >>> +{ >>> +    if (id < camss->res->vfe_num) { >>> +        struct vfe_device *vfe = &camss->vfe[id]; >>> + >>> +        return vfe->base; >>> +    } >>> + >>> +    return NULL; >> I can find code snippets above like >> >>     if (IS_ERR(csid->base)) >>         ... >> >> So, is it really a good idea to return NULL on error? Probably it might >> be better >> to return a reasonable error to the caller. > As general rule i agree. But here either we have address or not, > i dont see the reason to return an error code. Also i dont see what > caller will do if he gets error code instead of NULL. > I am refering in particular this case. If we have different error paths > of failiure maybe it will more sense. I don't see a compelling reason to change the submitted code. I'd leave well-enough alone for v4. Please keep changes for V4 restricted to formatting/line indentation/SPDX. I don't want to have to reverify all of this code unless a bug is found. --- bod