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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7336EC433F5 for ; Fri, 12 Nov 2021 14:43:25 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3AE2860EB8 for ; Fri, 12 Nov 2021 14:43:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3AE2860EB8 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=Z0qxQksYzxbvs5 Yka5Xz48ZhPp0m95qd8oHk78vzJrgWLYB+tkkhne75Tcik1P37jBAJhVvfSo5ct6l4VuD09EC6FTi Ri9FsrOKoDeYSF3h1DFigIZV/l6eeSPTNBHuUJLcgOSvTJGfjzPjbzXhauEFhAOhpGHS2mTy3NZEK eVfWQzxO7lRWxuZhJ8DQR+uB5PKk+RztR+w1Bcm3AmB0JbLErSL5ZPbLYkp0bnbrfFoYHP0rMfZ1P xe+hoRg5qxa96XYWtleLxYsH+zkag/u3HmDwhDB0v9LPWp8rIR6iUGnODSbst5Nn1wiUEzZNrOeCd YQ0THESFZvaFhBqbxpiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mlXkT-00Ar4n-EC; Fri, 12 Nov 2021 14:41:49 +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 1mlXYs-00AmRN-F2 for linux-arm-kernel@lists.infradead.org; Fri, 12 Nov 2021 14:29:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1636727390; x=1668263390; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QIlW9DbBMZJ7+M6XfWg1v8S4XbzujCKrn+C7a3HwsDQ=; b=l+ToTLLqCnDdoArPjyqsDL4lsYyequTKJJ89+Re5rWMs23xCvQ/66Zmz ps1SODbKKOqJuDTPNXqVviPrdpNT0HSZ836gIklMw+79TtXE1m1Fkt5qh 4KfHjUdR761sI4gi/jV1OGw7R91zgtUl+vEqG35fTQGcSikIjyB41+mDU y6LX5CQSW8xjkBm5PMvrxz6/z+C+UU0nP+q72BHN4vOrihLX5FbQ8rlBN DxjCRaJwCoXGUdyaV8NMQPj2v6SkBecJ4DfPpgI0KaXCwumXKK/8s7ofH QOZcyxOPqNvRtkOO5JqryOWxE2WnPtjHK5vD1fUhejfoZJVmrBA9Tqeyc g==; IronPort-SDR: amcE6qChjDHJVsWno9I8haaxsWfs4Nq3Zln7Jonw8COAxN7TF5CDs+QM5utbGdQlyT476q15YP p9Ixc05GzgVNahRSlt4s0pRIQkuyLs/xvsz/k8YDqs1eWKhhBXiWkjzexc0nlL2oG44qllqSbk rdY/+WsBZqOkMoadZk1x2oIKpxZGfbEtf6Z++kd0q5v0aOdw9Si+cjpHJ1zQvmWGTOxoRZUHUa NJxE5SO7gECXASlLHR5i361G0JLL5x+FhjxBvBsFzFn1QT/bgzdCRAEbUupHCwfDZ6yeGLchZo qITu8T0j/YyFANU3OxQxqihH X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="136388105" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 12 Nov 2021 07:29:49 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 12 Nov 2021 07:29:49 -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.2176.14 via Frontend Transport; Fri, 12 Nov 2021 07:29:37 -0700 From: Eugen Hristev To: Subject: [PATCH v2 18/25] media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check Date: Fri, 12 Nov 2021 16:25:02 +0200 Message-ID: <20211112142509.2230884-19-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211112142509.2230884-1-eugen.hristev@microchip.com> References: <20211112142509.2230884-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-20211112_062950_614205_041782C6 X-CRM114-Status: GOOD ( 12.90 ) 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, jacopo@jmondi.org, linux-kernel@vger.kernel.org, sakari.ailus@iki.fi, laurent.pinchart@ideasonboard.com, Eugen Hristev , 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