Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1080412pxm; Wed, 23 Feb 2022 17:36:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBXGxKeNdy3kkCH8/aF3BLI6sMu4pSLUzE4zFgp3ouoMJwxa0Y0vTlTSo3aRCIkuHbVh6m X-Received: by 2002:a63:b47:0:b0:373:cbfb:f4c8 with SMTP id a7-20020a630b47000000b00373cbfbf4c8mr459553pgl.328.1645666596605; Wed, 23 Feb 2022 17:36:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645666596; cv=none; d=google.com; s=arc-20160816; b=ZexR1hI2aGBq5oWNhAld3zCKfulj72w/R6my0dnPSv/5G/obw3Ni6iX3VwmOtFxezw 0CjnThvI7ok8VjBGxTQRtHgNaBj57gn0vCeIltS6pAlu7aKNx3Ac+dVBY/VjscHqA+dI Hh/V2awprmdW4DlQYdr8q5WLfM9d2zSRFqGufMnfpzA2lG6AEikyWe+Vrxr9Dzr7K9JS lyrqjA9XtHYVQs9AtS9Ei20CjuchafezLBQZzQrTmNRa7yVvU4Gf25aaFZ+3UnNs5KLs gReBuYVjKuG/7tq6Eb/LhRTW9mEqUQCJDca8+nOWorlr+mOjKmM13Wpppve4X8mZm8B0 rTjQ== 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; bh=A7PBytqGCu/LJdfeNmLUDg+QfgFDSYrLBRD2vLjRR5Q=; b=KJY6aPTlBv4D2sYtaXKtXvoDTRbAi+MqKoJdHRw4SRjrfna0Qti4JEx8IcnY+f54VB ShUgGyqy94eDsm7vbLlqmPT1qviG2kXinS3UHe01Lt3LftNb8JH5EYxm6S1XyOE4wLii L12zcVDZkQuXd6Za5cHgC55nA+v9HPVc3PuTg+DJmm2QcR6aEXt41n3HlsxfqMP7vW1l +fNeOdge5P+7DdQ594k9dnwgCo6ggeA76bMiGI4QPIDUbJNOgU6jsgC8Vm2UqUG+Py0b dseT+U+eWL+Sl3mG10HFzaMfePO+y+Zfdz6nulI0NV8RFgzUWRLkTKnL0OguFxwcVip1 g3dw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id y14si1061511plh.200.2022.02.23.17.36.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 17:36:36 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7A12C28D3B5; Wed, 23 Feb 2022 17:14:57 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241839AbiBWRH1 (ORCPT + 99 others); Wed, 23 Feb 2022 12:07:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232588AbiBWRH0 (ORCPT ); Wed, 23 Feb 2022 12:07:26 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF0931D4; Wed, 23 Feb 2022 09:06:57 -0800 (PST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id E28681C000B; Wed, 23 Feb 2022 17:06:54 +0000 (UTC) Date: Wed, 23 Feb 2022 18:06:53 +0100 From: Jacopo Mondi To: Eugen Hristev Cc: linux-media@vger.kernel.org, hverkuil-cisco@xs4all.nl, nicolas.ferre@microchip.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, claudiu.beznea@microchip.com Subject: Re: [PATCH v5 05/13] media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check Message-ID: <20220223170653.z5frqap4wsvi3lsu@uno.localdomain> References: <20220217135645.1427466-1-eugen.hristev@microchip.com> <20220217135645.1427466-6-eugen.hristev@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220217135645.1427466-6-eugen.hristev@microchip.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Eugen On Thu, Feb 17, 2022 at 03:56:37PM +0200, Eugen Hristev wrote: > While this does not happen in production, this check should be done > versus the mask, as checking with the YCYC value may not include > some bits that may be set. > Is it correct and safe to check the whole mask. > > Fixes: 123aaf816b95 ("media: atmel: atmel-sama5d2-isc: fix YUYV format") > Signed-off-by: Eugen Hristev I trust this Reviewed-by: Jacopo Mondi Thanks j > --- > drivers/media/platform/atmel/atmel-sama5d2-isc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c > index c244682ea22f..025c3e8a7e95 100644 > --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c > +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c > @@ -291,7 +291,7 @@ static void isc_sama5d2_config_rlp(struct isc_device *isc) > * Thus, if the YCYC mode is selected, replace it with the > * sama5d2-compliant mode which is YYCC . > */ > - if ((rlp_mode & ISC_RLP_CFG_MODE_YCYC) == ISC_RLP_CFG_MODE_YCYC) { > + if ((rlp_mode & ISC_RLP_CFG_MODE_MASK) == ISC_RLP_CFG_MODE_YCYC) { > rlp_mode &= ~ISC_RLP_CFG_MODE_MASK; > rlp_mode |= ISC_RLP_CFG_MODE_YYCC; > } > -- > 2.25.1 >