From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E0CFC433EF for ; Mon, 13 Dec 2021 13:54:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238337AbhLMNyZ (ORCPT ); Mon, 13 Dec 2021 08:54:25 -0500 Received: from esa.microchip.iphmx.com ([68.232.154.123]:8693 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238319AbhLMNyY (ORCPT ); Mon, 13 Dec 2021 08:54:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639403663; x=1670939663; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QIlW9DbBMZJ7+M6XfWg1v8S4XbzujCKrn+C7a3HwsDQ=; b=Fyg8aJPPgQmLqKiiVTTjSCL2oIEf7XTSpeS7cU6aMl4Gtv0evoLok3SQ XLr9Lk6rip8LLdXYkZbfdjG/pUV2id370TrGh754yCFQogIW/SJ3FNP1G xzWQpwO2/fA1vFbE50KPBLQG6wSxA3++t87He41k7jvOJdLEtbvmZXk1d y/l8FNqASfDEdU8xrhNp1TKWbBGjgSUSmzcsfQwKilytvZhQXuVx/Tfe1 pLNVr/vK7/FX/cDs1lh2lV3dJptwo+SY5kA8pgaxH74iI6mFYSHe6K66k L+FhjKZbvdia2v1R2LO6tTXiGNWMmkALdFuYS9ntOv7Yme0bONKGgZNbZ Q==; IronPort-SDR: wDGmGxfBH2D0eZQcYh9AqZdKfZ945ZESxSAJ8QYnfufrCgSuLff0vuKGFUCrpcMAJ8W05XqmHu tJtVRZUfccSimTO4vizx7Ggysnbci+xh//0+sexRBDFrs1eq3GzHReirFv5TW1RVUu1FfGnGEH +exzHNY6qLxx4t6HWJgd5+3ybrsiqrTDy9MwgwHG80XI68MLFYsk24ARK/AZTB95SSdrUxH+D3 WxJcXFw4A2u3TXuUdh1ucZNY5bYSnYTNv2SD9ZKLezeLtmk3ZLdCgiuJbIZU0/MP6n5WGF3eBp QXnQh/stTcqdl93xq9YRMQ+x X-IronPort-AV: E=Sophos;i="5.88,202,1635231600"; d="scan'208";a="139571631" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Dec 2021 06:54:23 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 13 Dec 2021 06:54:22 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 13 Dec 2021 06:54:11 -0700 From: Eugen Hristev To: , , , , CC: , , , , "Eugen Hristev" Subject: [PATCH v3 16/23] media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check Date: Mon, 13 Dec 2021 15:49:33 +0200 Message-ID: <20211213134940.324266-17-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211213134940.324266-1-eugen.hristev@microchip.com> References: <20211213134940.324266-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 a3e4c32a66c4..a8d4ba60d3ac 100644 --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c @@ -267,7 +267,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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78815C433F5 for ; Mon, 13 Dec 2021 14:07:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Iloekn8b524XXX3KNqVrSNoapaVpw3w9PPbiBJeAaiU=; b=cbvzS6JmMv1qnW ETdvtnOBU/yx9pTZxLSV3vMGGpCA8JCT2eHlhwheSV8g+FfUr9u49ItX3KjNnz0egr0uVmgNApuBb e/iIYcrpLrn4fcmZHf34+whWnLHRoiv5DRGqFfeNLTo5S9TAf/dR/zMchko1FJuhTwmYNlF+xf1+h AdZeY+pdVCuJJxA+C3x9engmYWribyMNBPd4UV3m3PHyVxbsieDJyDJIpEHfQxlneEm+RjM/A1Nwp QXnQ3swJVuwAMARKcJtz14pM0wSejE6R7Cv4Mdtw08+QmMeP9Q22rNdJjpye5MXKbcP/1+Biec1e8 ykB5zo3kBHjR36uTdqWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwlxT-009uDZ-DO; Mon, 13 Dec 2021 14:05:39 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwlma-009pPF-Dg for linux-arm-kernel@lists.infradead.org; Mon, 13 Dec 2021 13:54:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639403663; x=1670939663; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QIlW9DbBMZJ7+M6XfWg1v8S4XbzujCKrn+C7a3HwsDQ=; b=Fyg8aJPPgQmLqKiiVTTjSCL2oIEf7XTSpeS7cU6aMl4Gtv0evoLok3SQ XLr9Lk6rip8LLdXYkZbfdjG/pUV2id370TrGh754yCFQogIW/SJ3FNP1G xzWQpwO2/fA1vFbE50KPBLQG6wSxA3++t87He41k7jvOJdLEtbvmZXk1d y/l8FNqASfDEdU8xrhNp1TKWbBGjgSUSmzcsfQwKilytvZhQXuVx/Tfe1 pLNVr/vK7/FX/cDs1lh2lV3dJptwo+SY5kA8pgaxH74iI6mFYSHe6K66k L+FhjKZbvdia2v1R2LO6tTXiGNWMmkALdFuYS9ntOv7Yme0bONKGgZNbZ Q==; IronPort-SDR: wDGmGxfBH2D0eZQcYh9AqZdKfZ945ZESxSAJ8QYnfufrCgSuLff0vuKGFUCrpcMAJ8W05XqmHu tJtVRZUfccSimTO4vizx7Ggysnbci+xh//0+sexRBDFrs1eq3GzHReirFv5TW1RVUu1FfGnGEH +exzHNY6qLxx4t6HWJgd5+3ybrsiqrTDy9MwgwHG80XI68MLFYsk24ARK/AZTB95SSdrUxH+D3 WxJcXFw4A2u3TXuUdh1ucZNY5bYSnYTNv2SD9ZKLezeLtmk3ZLdCgiuJbIZU0/MP6n5WGF3eBp QXnQh/stTcqdl93xq9YRMQ+x X-IronPort-AV: E=Sophos;i="5.88,202,1635231600"; d="scan'208";a="139571631" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Dec 2021 06:54:23 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 13 Dec 2021 06:54:22 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 13 Dec 2021 06:54:11 -0700 From: Eugen Hristev To: , , , , Subject: [PATCH v3 16/23] media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check Date: Mon, 13 Dec 2021 15:49:33 +0200 Message-ID: <20211213134940.324266-17-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211213134940.324266-1-eugen.hristev@microchip.com> References: <20211213134940.324266-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_055424_576995_E60792AF X-CRM114-Status: GOOD ( 12.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Eugen Hristev , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 a3e4c32a66c4..a8d4ba60d3ac 100644 --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c @@ -267,7 +267,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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel