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 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 14C99ECDFA1 for ; Tue, 25 Oct 2022 15:18:51 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ib12T0SMuOIAXD5M+Qk8vtWUzWAJj4uIEkYkkxi/Uao=; b=4FO0gw86DISGXh 07ClZurYjWVIEfNWUa6K9bSYAP1N7ji4OuUGg1LEt6zFfFXVGRgmZ8UvBvk6IpFAJA79TMGT4FHzZ fWelrbkp6Xkf9pJpgCUBQszFmmv6kWmUtnknm6etcPmx1D6lDel1eNGEitrkeSNc9OiTH5hJnUDWY BMF2Dnqy26Uc6h8m/xowcCL7qd+yCvrpyksQN8KZA6hO0nNxG5sLce0kjnMSbrDerWpqfY4XH9ZWV z77uUC1ngx/++zrgCPf7fl/KORyo/bIXevf9SoEW+PubI6pNAcCh14sISd4xcmcOTj3LdL2Fcp1d7 ZlfV8EtiMR+s5ek+w/YA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onLge-0062hC-Fe; Tue, 25 Oct 2022 15:17:52 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onLgb-0062g8-OG for linux-arm-kernel@lists.infradead.org; Tue, 25 Oct 2022 15:17:51 +0000 Received: by mail-wr1-x42a.google.com with SMTP id a14so18862834wru.5 for ; Tue, 25 Oct 2022 08:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZNYnzxUYxZx4XD4Lwaw+hJ+8re+ot06tXHAq9yK6z6I=; b=lLz0o4cAIskTwp7ABd3e6vyx5q9XxRcKxkusLDtvncdPEUydTQN6ylznML/3yB/0B6 Y9gCW+xnxc00wI62CK2Id71kIm2nTL5yZ6A9kA4FnEBAnSCc+YMg/zWSLzBdSSwxqcbO Q2tBKIH/Q5WtjxR1VQVZ0eHNyECpX6rskKU9JCTZT3eWsAvwGobcfo8EFNJt5Uih/aue lWPYXHA6lKVRqJyFit/eNyzZqiib9/lf19QFCa61PAguWbmSrV6SWapCKMCjARNSzg89 2E82SAv44NB+Irys2ei9Y6ka7JobgmEq+Vym3LLPyxclsI3iiYFhh9QZhsqc/ZSXWigz iLMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZNYnzxUYxZx4XD4Lwaw+hJ+8re+ot06tXHAq9yK6z6I=; b=JeD9UM0X5s9bw1H1jQR6rqrAF/Qs/N/P979QA+qWZw15Bf9PCJHbZ5HaV6GuZRFgQJ 168JdwnGW9Pu4E4iTQGM5e/Ow6KOtTWcCMxWmm+5kUKL+CmF5KPmmxe7UbfDdwvSbwma U7lnew0uTgFF1OLrl+H7yHJ8/AnPW31t2/G1CFKsJ+oHTItRw6vheaC8IazosW/F3HCL OWazoyUBNXTXlKOt4/L1ifREtBxUIej8hGijNKxmcFfucNHwyAQ9avkUWjo93FD1fX91 2ZRbWME8TcDg8HBCrmIux7oGl2lmeqf2Cnuqx63k5zP9oRIZAZQu/hXoqB0gkueTavvP 0QDg== X-Gm-Message-State: ACrzQf3pHeUbZkSFcP+6/bsP41CmM+7+7BXGDnIjbH9waGjtVYMhDpID biJUOjmAoBKfCftPmV6ORZQ= X-Google-Smtp-Source: AMsMyM4k+sL9ejhrgxIrUG2j+VYySP/clvgyL/EnFgkDZ96m1kQCxllzpWiqTW4fA086/Ds6KHJt9w== X-Received: by 2002:adf:ba8f:0:b0:22c:def3:1179 with SMTP id p15-20020adfba8f000000b0022cdef31179mr26168784wrg.571.1666711068568; Tue, 25 Oct 2022 08:17:48 -0700 (PDT) Received: from jernej-laptop.localnet (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id f9-20020a5d5689000000b0022e3538d305sm3358017wrv.117.2022.10.25.08.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 08:17:48 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Dan Carpenter Cc: mripard@kernel.org, paul.kocialkowski@bootlin.com, mchehab@kernel.org, gregkh@linuxfoundation.org, wens@csie.org, samuel@sholland.org, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 04/11] media: cedrus: Add helper for checking capabilities Date: Tue, 25 Oct 2022 17:17:47 +0200 Message-ID: <13124586.uLZWGnKmhe@jernej-laptop> In-Reply-To: References: <20221024201515.34129-1-jernej.skrabec@gmail.com> <20221024201515.34129-5-jernej.skrabec@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_081749_813472_F992BC12 X-CRM114-Status: GOOD ( 18.77 ) 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: , 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 Dne torek, 25. oktober 2022 ob 08:30:28 CEST je Dan Carpenter napisal(a): > On Mon, Oct 24, 2022 at 10:15:08PM +0200, Jernej Skrabec wrote: > > There is several different Cedrus cores with varying capabilities, so > > some operations like listing formats depends on checks if feature is > > supported or not. > > > > Currently check for capabilities is only in format enumeration helper, > > but it will be used also elsewhere later. Let's convert this check to > > helper and while at it, also simplify it. There is no need to check if > > capability mask is zero, condition will still work properly. > > Sure. That's true. Out of curiousity, can cedrus_formats[i].capabilities > be zero? Because it feels like that's what should be checked. Yes, it can be. It's the case for V4L2_PIX_FMT_NV12_32L32. All variants supports it, so there is no special capability needed in order to be listed. What would you check in such case? Condition still works for this case. Best regards, Jernej _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel