Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp812719pxb; Thu, 17 Feb 2022 15:34:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZZecUKq+j4vtvxFsfgC0tc6wroLPJQe+J5CoGW7r4gJYsUTJgF69Hvk10hyE8MalUDIUH X-Received: by 2002:a05:6a00:21c7:b0:4e1:dba1:a3a6 with SMTP id t7-20020a056a0021c700b004e1dba1a3a6mr3285194pfj.59.1645140865539; Thu, 17 Feb 2022 15:34:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645140865; cv=none; d=google.com; s=arc-20160816; b=O5Szga5Ov9q8ZbfgTNP+jWei9+M8pidAv1v0lYV87dZmpt7lSe20sB8TOUmtYt35D6 2JhHspU8BXDezmLpVbsymK2R1Xu70QB/3O5FOoHhPC6UwuvO/zt1zg3ek71uHdInhFrL 07bIbzKJKHrB+TTwUIiK2h2mqDhYLyl6C6BJQxZOeWIzUnQwRYvB3hxY9VAIN544b1DN l1sJTmM1mb34oqPoZE5EU5VVNOxU/WBdHHwQrUzrf0bmEwfAHWx72KEu1ECCg7Xk9Fte YI3lkYYlFZ2z2zx2o/VVdPTaKUT9Le6OPHDRtI5nda0XbiWlFuujCKYjdJXAy7qRF4Dy 9vQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:dkim-signature; bh=h5/GxdWxjFIod+Yv23E9ZYUZeZ2uuqJ/3OSExUmpsEw=; b=XmQ46zVRVL9/vlZw7Is+epWyj8Az4zdDOGIVwNYBTAIuUV162C5fZfLRfyYJZ8NgMF HhEWE0LZEOUTr3df0aYPeT7Oblr3JekR+hCtPGrf7BC8zIwk6brlJ4RNbBvr/G9U2oAp eWdJ7LhEoMBPtqBbz04WA9JlPAMzY16v/1uqvaGACVJaYDGL5W21rZG+F9aD0Ef82Qqi POJeaTX/hu5Cu00uiRLPmYYQlbjaUhSWZQ3ycFom45neVqysQQU6PGSmALYgJayqGl2I TgjHucf6P12NTdxYhNpVzaf6vKKJIXKeRtax1CZVD4bUuGTCA0ETgELRpP93J5B8mhOv KmQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=ixropleG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c2si862725pfp.265.2022.02.17.15.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 15:34:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=ixropleG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4140E2B6D4D; Thu, 17 Feb 2022 15:14:49 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240844AbiBQN7Q (ORCPT + 99 others); Thu, 17 Feb 2022 08:59:16 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241536AbiBQN7N (ORCPT ); Thu, 17 Feb 2022 08:59:13 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 060FE2B04AA; Thu, 17 Feb 2022 05:58:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1645106339; x=1676642339; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Q6diDbG5W/BH3EeOJNaDQg5HrHiclFaPCU00lATXlck=; b=ixropleGBgqZpP6tdjTMVM30PcMhnFOfAgVBJTZYWQkK7WgSPS1p/nGd 6g0Nid9cxwQd79FrhjwanXlaqGI48qhLFVCoPKzA08x4yAy1Exv4yr5t9 7dEy1s8FJt5A9Io+5pScZqPQC162681li7yxpxDVMvrV6xQAKvVg7LerG e5GncG9lTCRg5sPbcrBD9NsNdabkDTVlg/o433UpU10HrzLbVqE4b/uhH 2DwRL8e46ujOaWzGVykx1pEGk+Iq5JuYo7zt3zUgu6coGhzUagpMUoA2P HnUFnT4iQrBgVKDKge7ml1xgEf97yej+vrZkMZT5oT6IXl5ib5gEM9UcU w==; IronPort-SDR: ug/QtYItfUctoanUV7aHR5K+FUfnwGMGYfVgV9nmUlf60XjI2WrkhLXKHMnL83Ymc0E6NsjbjX 1yzefEq8AL3dywUk0wZvRtgvntI0JlU8OXWyS/sfouzIzePF0y7uWkY0sm5ozt15b2YWyAyUit dRDsEeRX9X5d2db7GmpSZh2qlSuDe1oxLf3w+PwArMKytDZux4Jy4iaiRQoBVnWCpXI+9mcrTT /BBIPgXmzGHfqz70Zq1J6442MosnAUnVC94jINL4VW1wTKg937z4Q4m4gXyp1rKpc31phSqink XgiHzTrEJKctISTdBP9wZkXa X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="153432210" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Feb 2022 06:58:52 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 17 Feb 2022 06:58:52 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 17 Feb 2022 06:58:36 -0700 From: Eugen Hristev To: , , , CC: , , , , "Eugen Hristev" Subject: [PATCH v5 05/13] media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check Date: Thu, 17 Feb 2022 15:56:37 +0200 Message-ID: <20220217135645.1427466-6-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217135645.1427466-1-eugen.hristev@microchip.com> References: <20220217135645.1427466-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 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 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