Message ID | 20211022075247.518880-19-eugen.hristev@microchip.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=AiQL=PK=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E8B7C433EF for <linux-arm-kernel@archiver.kernel.org>; Fri, 22 Oct 2021 08:09:23 +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 126FB6101C for <linux-arm-kernel@archiver.kernel.org>; Fri, 22 Oct 2021 08:09:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 126FB6101C 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=ABW5HdEedcnEM7wTDP+Tj0Tm328RblU2LRAqGxyqTEM=; b=4x+xrc3jDtHssv Y0pEs2Xau7/zDNqL6qJ8UytbDRBe0yOM558DHlWWCji5Wd0eT2TFDKMDwkMIdarGGCPzP3mYfIfLJ iKFjIQUtmOJTc0fWKb12SMEjX0//5QAVOLyJCGwBzAZiNKrEGoU95HNjGgtdNUwNJXzTUqh0hIcn8 fIM4B8aIm4Lg4LRoGmMSUPKYsCtRxaANb1eRnV5LYHFt30937hlyYndPOoLquXLutBwPHt3qbK0Nw J3nJ3+zMborgAx6wxRYrsJmUiKENGIB/n42seZjSuLZ2ftS3y//gu80RB/DAyt2QD27auYWE/Ml5p 5fWCXriczo98J4AJVEvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdpaA-00A7M1-Jw; Fri, 22 Oct 2021 08:07:20 +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 1mdpO7-00A2Zx-Uu for linux-arm-kernel@lists.infradead.org; Fri, 22 Oct 2021 07:54:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1634889291; x=1666425291; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=D0ieQhGQKRttt8Quef04SMrFGlqdtCHyoWYWeCfMDGk=; b=j5ywe2B79kAL8/06eutj2WJYe+fbw/DH70oUL4cgUVqkHiMrt8gX4TIA I8A1zeZgDejD+P4SwDpKGwGhxKvfWg8FyqIMYR6CiUZhyO4S8qkTI1AEi CjG9uefCH1gE10cN6fT/xm7jy+z45QSW6Ui1fmjEZkupNszjV4+LUYa1F hihRjGv1WoBuFrhax0AcjjWjv+w0y85mrFfg18EpS03GdZ4wYViPHyPs4 Y9Vg5Ej8H+OxX1YBKFr1qhErUlnHpRnS/V8IsFYQPfeA5lFd0mvXrXW8B vWXeCLxCGbzN7rnwdmmWXIzG/k5nJYOL+vP+E+vPN6ZM6B8vVRlYWv/fI A==; IronPort-SDR: YHOphYOD3Hes4fbLfCeCzTP158oEPByAbT/aC+ooqTu6zMPxpa/GuRvA/883Rl3Agc7hcrmnLX 7u1uiSzGXTlyiXCag9R4wcv5BwI65XEDFbiUoU6Ni2ABFw0dnPYSz7qBZro1ydFdWCY4nPRcuF dsT3oou+7Hb3qbqzCWESmf8s6KcyN4CYs3/KEJmikScSFcTyRe4Xo7yOJHw+gRXJxRKSgsliFF kvW9mgLEmcRkujkWaVsFcD4OGd3BbyvlWFfk0AUs4nMVIMRNTufVSthBT5uBWIEGok36l3/3Zz VaeGt6YLMoXZtzKxl9M9di2x X-IronPort-AV: E=Sophos;i="5.87,172,1631602800"; d="scan'208";a="134007238" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 22 Oct 2021 00:54:50 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 22 Oct 2021 00:54:50 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 22 Oct 2021 00:54:47 -0700 From: Eugen Hristev <eugen.hristev@microchip.com> To: <linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org> Subject: [PATCH 18/21] media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check Date: Fri, 22 Oct 2021 10:52:44 +0300 Message-ID: <20211022075247.518880-19-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211022075247.518880-1-eugen.hristev@microchip.com> References: <20211022075247.518880-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-20211022_005452_157485_AE738DC8 X-CRM114-Status: GOOD ( 12.35 ) 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: jacopo@jmondi.org, robh+dt@kernel.org, sakari.ailus@iki.fi, laurent.pinchart@ideasonboard.com, Eugen Hristev <eugen.hristev@microchip.com> 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 8c088ad899ea..6c9c5fb041d7 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(-)