Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1365816iol; Fri, 10 Jun 2022 06:09:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXhc5sE2gs4rwMFDivSZMPHeEz2dj9qiEh56KcxuIWvO4/hmg6ivbIDeQvjhLK611J++r5 X-Received: by 2002:a17:90a:9741:b0:1e8:a001:5caa with SMTP id i1-20020a17090a974100b001e8a0015caamr8711131pjw.231.1654866592379; Fri, 10 Jun 2022 06:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654866592; cv=none; d=google.com; s=arc-20160816; b=W8XnKHr5QlZo7+ODaOS+wpUGyH25TrFmDP1OhkFNpknnozXwr4YRL1oLHxO8YLMX+e +mB6j4Re4BdFuH3ZsUy2yVD1SmxSDxYrUpRJwfl4eRPu7XdBYwlTWys/EiO7XR5Ii96J GGnK3fB/vi9wvYW362yiFVys3rMOEu66Hjgdt7BlgHHcZxD90tauKgvGVmYD0nGyixvE jL7Hp1vytQePN4STTINKb/I1xrHkyVDoiihJUo9smYNVZ3DPVNR5JKUTzYI5apRif3VW ivXqVAF8flgJxFgGA2UmypM4RSU7ZvdTUxsZclgJihauuVDsZy5dWCGj6RaimYx0XC9A IgAw== 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 :dkim-signature; bh=N5IJMu0vCGjb2sc63sXq2YnSGmhCRbAw52HoEhs5bbU=; b=b1LQEzLfdpmf9X6IzC31odkbhrOwUNyMv7CyGTau4kdODEnFXwG8F7ORnA7lsX6fVo Ahvcxc2q3QBvNrUiOmrCk8jQE3Blw3kCn7q8ugnimHkwQJVL6irOsHM/ptHK25mNFfPY JgyM39mlfczIOZbynEUT1zWork7AbSDLc7339b3Xhq2D9eHHjMPvK6C+xVGFE3kzbZ69 y5H5I2AOv5DRuA/Oeh3a/oVmINcfrWYCbHycTsxpo7ipDylwnRcy/EWU4JGOLgCbrg51 qXULVulQczKOtE3dbSwXPDX6cOxkvZN6EHdoeJZ27OK21/cF73KBRnAxNnXeXyNMrM1G iOqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=gq+TSIpE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n9-20020a654509000000b003fe428b329dsi9435111pgq.839.2022.06.10.06.09.38; Fri, 10 Jun 2022 06:09:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=gq+TSIpE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345443AbiFJMwt (ORCPT + 99 others); Fri, 10 Jun 2022 08:52:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345181AbiFJMwp (ORCPT ); Fri, 10 Jun 2022 08:52:45 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56A6144A16; Fri, 10 Jun 2022 05:52:44 -0700 (PDT) Received: from whitebuilder.lan (192-222-136-102.qc.cable.ebox.net [192.222.136.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nicolas) by madras.collabora.co.uk (Postfix) with ESMTPSA id C48896601725; Fri, 10 Jun 2022 13:52:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1654865563; bh=7hV4k2F2AcwF7i/toKo78FMa4mcKD+wvplQQ+zerGAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gq+TSIpE7muF4e0VQ6gm9IBeHKeRk0p3UvL5q8/Hlw9KWXcr7fUnvdTyTxFscEY+h VadP8dTrHK0TvHj54DRwY/RfeE7XBYLAc4YgxqYZCqtvPuEBynUaDB/U2u1xAnv1IS BVQS31NtpUKWncLgIz5jstZLchQiG48exFZRnsZwzVjmI7S7W5Pru6pJTowxdG4vwz xEklqbHFWn039wGSNs9T6hATco5bsadsz4t3iE24I04bqo7wQFAHzwcEFC8cbaghjn WyPqHaEMfj3qsgJ4RV6hxFVFGyBxf/dvw23Ndg9MGuKrbOsVE0c22xJ0EoaFXZxgJG IGBYApMmLN67A== From: Nicolas Dufresne To: linux-media@vger.kernel.org, Ezequiel Garcia , Mauro Carvalho Chehab , Greg Kroah-Hartman , Boris Brezillon , Hans Verkuil Cc: Nicolas Dufresne , kernel@collabora.com, Mauro Carvalho Chehab , linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v1 3/5] media: rkvdec: Fix RKVDEC_ERR_PKT_NUM macro Date: Fri, 10 Jun 2022 08:52:13 -0400 Message-Id: <20220610125215.240539-4-nicolas.dufresne@collabora.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220610125215.240539-1-nicolas.dufresne@collabora.com> References: <20220610125215.240539-1-nicolas.dufresne@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 This information is expressed by bits [29:16], but the actual implementation was reading bits [13:0] and shifting that 16 bits to the left. Fixes: cd33c830448ba ("media: rkvdec: Add the rkvdec driver") Signed-off-by: Nicolas Dufresne --- drivers/staging/media/rkvdec/rkvdec-regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/rkvdec/rkvdec-regs.h b/drivers/staging/media/rkvdec/rkvdec-regs.h index 15b9bee92016..14530b81560e 100644 --- a/drivers/staging/media/rkvdec/rkvdec-regs.h +++ b/drivers/staging/media/rkvdec/rkvdec-regs.h @@ -212,7 +212,7 @@ #define RKVDEC_REG_H264_ERRINFO_NUM 0x130 #define RKVDEC_SLICEDEC_NUM(x) ((x) & 0x3fff) #define RKVDEC_STRMD_DECT_ERR_FLAG BIT(15) -#define RKVDEC_ERR_PKT_NUM(x) (((x) & 0x3fff) << 16) +#define RKVDEC_ERR_PKT_NUM(x) ((x >> 16) & 0x3fff) #define RKVDEC_REG_H264_ERR_E 0x134 #define RKVDEC_H264_ERR_EN_HIGHBITS(x) ((x) & 0x3fffffff) -- 2.36.1