Message ID | 20211213134940.324266-17-eugen.hristev@microchip.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 <linux-arm-kernel@archiver.kernel.org>; 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 <eugen.hristev@microchip.com> To: <linux-media@vger.kernel.org>, <robh+dt@kernel.org>, <jacopo@jmondi.org>, <laurent.pinchart@ideasonboard.com>, <sakari.ailus@iki.fi> 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: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: devicetree@vger.kernel.org, Eugen Hristev <eugen.hristev@microchip.com>, 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" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
media: atmel: atmel-isc: implement media controller
|
expand
|
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; }
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 <eugen.hristev@microchip.com> --- drivers/media/platform/atmel/atmel-sama5d2-isc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)