From patchwork Fri Aug 7 08:35:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 256228 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CB44C433E1 for ; Fri, 7 Aug 2020 08:36:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C06022CF6 for ; Fri, 7 Aug 2020 08:36:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dhFLyhzD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727024AbgHGIgK (ORCPT ); Fri, 7 Aug 2020 04:36:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726511AbgHGIgK (ORCPT ); Fri, 7 Aug 2020 04:36:10 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA952C061574; Fri, 7 Aug 2020 01:36:09 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id h7so1034733qkk.7; Fri, 07 Aug 2020 01:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=o5jxKv6AGUpMqPYX4rcg8Y6ClYjKX89Kxhh7saOpFoM=; b=dhFLyhzD15lHcsKFDPnlp0crGaMdObAVg/OSbLAsxs5pJnP6ERVO/zXRoef8cE7iZ/ +zmq6TaIBv2tJMEXWUKBW4MKQnlq9UvYR5DwH4Iez9jRqLVK3sADUX/IamPU0Tf24PFL aLDEeQPQTczCr9Vx4f1669wGYqBFFZqRYfhkLp9dvBOJZSVW5b6JLcuiYe+Gu4plmvu3 DNFuZ5U/in3smz4DVbJAPNlfxTrtiIutzI1feCdtmAbFG22C7s15zypPzQMbVcHYP+LO rpUSZLfJ8sVbxb1iQ/oVgIHEtqEQyEPuh2JrzJQbN7Z+TY+zwACeop9SLXcVBuR7h+Nh W9UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=o5jxKv6AGUpMqPYX4rcg8Y6ClYjKX89Kxhh7saOpFoM=; b=b40BDK1uXXev7SAyPAhZuDOu9AsUf8NE2+v0ltZLRrmqaYyNGvCT+cegFDZpBCu3Zz Qvcti9WEOHMb6nQTnlbHH/iDCNMvHpAY210vDlD2g0Z4UahqLMepwwZCA8zDkyza6Qxr ZEgdPp0tFKBQQgsAki5uzoULfGb7luufblUM7Zh/ok23IuT/bmlnrH1Vc0muzRfzS/Gd X7qurkQ5/M+Y0NZBnzvA8mxV666GLNROne9OQ+SOb4sGvbJ95IUzC5m+0CLBD+ryuwiY 8dgs/Vex6Og5TYNpxSvuSy0aHrCFvWHcz0ZLRSfl4HG86kEDLWAletuJRF/qaHbcuQIo rF0w== X-Gm-Message-State: AOAM532GM5469Hq+f8u7nDJJSLvFdSHsqrll4Wzwphk9rfaN3R1PLLJ/ Zw1uQoytdGL48StHNH7iHLo= X-Google-Smtp-Source: ABdhPJzLXuaNuBUAJkxY5f5H7E5+VUxW1JqrBrW9nuJ239/72kYuC86uQvEkINpqUygtjT5DHaaoQQ== X-Received: by 2002:ae9:ef43:: with SMTP id d64mr13215403qkg.326.1596789368992; Fri, 07 Aug 2020 01:36:08 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:72b1:8920:da15:c0bd:33c1:e2ad]) by smtp.gmail.com with ESMTPSA id c42sm7846728qte.5.2020.08.07.01.36.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 01:36:08 -0700 (PDT) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: Jernej Skrabec , Maxime Ripard , Chen-Yu Tsai Cc: skhan@linuxfoundation.org, "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/20] media: sunxi: sun8i-rotate.c: remove useless error message Date: Fri, 7 Aug 2020 05:35:28 -0300 Message-Id: <20200807083548.204360-1-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" This fixes the following coccinelle report: drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c:751:2-9: line 751 is redundant because platform_get_irq() already prints an error By removing the useless call to dev_err() Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida --- drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c index 94f505d3cbad..3f81dd17755c 100644 --- a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c +++ b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c @@ -747,11 +747,8 @@ static int rotate_probe(struct platform_device *pdev) dev->dev = &pdev->dev; irq = platform_get_irq(pdev, 0); - if (irq <= 0) { - dev_err(dev->dev, "Failed to get IRQ\n"); - + if (irq <= 0) return irq; - } ret = devm_request_irq(dev->dev, irq, rotate_irq, 0, dev_name(dev->dev), dev); From patchwork Fri Aug 7 08:35:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 256227 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19CCEC433E0 for ; Fri, 7 Aug 2020 08:36:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC3CE22CAF for ; Fri, 7 Aug 2020 08:36:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gCpC7fze" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727108AbgHGIgT (ORCPT ); Fri, 7 Aug 2020 04:36:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726511AbgHGIgS (ORCPT ); Fri, 7 Aug 2020 04:36:18 -0400 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66389C061574; Fri, 7 Aug 2020 01:36:18 -0700 (PDT) Received: by mail-qt1-x841.google.com with SMTP id x12so744024qtp.1; Fri, 07 Aug 2020 01:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+JFdj4sPIeByfBYRmF6Vt6YCTyJ6MLJ/8TJDghwLhlI=; b=gCpC7fzeIm+LGpcHVTEPpJZ/qYf3NBmCWnEdXvNd8bPPSg3ETdXqAgp3s8CAu8vUCH FCZ0xIYvC/7P3l6/4C0rmj1aVAn122Ud91Yl6LYlwTFMNFb5mcSjXWHrg+5ISEcuWAsD 4c4YpKeY7IbyHfR5FUWXRvWiX/LdCBeumzsaUKQu03DoftsTiOWj3il9XwjWHd9z2HLs fhpoXN8yLApN3YrAsNg84d0H/oiFYnnETzI1r1nNeA2IiH4JsirBEvmwhOllOBYZtlWJ u2peodGRjn+EWGQr98qp3/VjxL3hh8foOj9HdOlODegN1by7d+ouJP6zIu3okWe4oSAA IkKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+JFdj4sPIeByfBYRmF6Vt6YCTyJ6MLJ/8TJDghwLhlI=; b=gD+duSO5tK0yTdyOWI0MT33c46Dqeyj1n+8T/U1V5zVw82rtd/akjVu31otlmhXQhQ G2XmFvObeu/XRqgIQrnc8xDPWbFaIh2B5AYRGNYtBCmFWl1BJfKJyrB5OkBxbCJTZ9VD Xnfza8G1j/RTh/QsMdrSgP6Pt2bGF0X1rDDH6V+4LKsNNkHaq11c0oZlKylH96g+7Uiu 3UWtEKhr1o8epdIUHXFohycR+XJRA2KnzYHpJQgUU9iq+kXDA4wGRc7hSxZCjFVarm6f AB40iu76cnhVUzgKqc8A4moRx52NW25zX0z8unTsAzVimmvonxHwrk9AtTXf+SmG473T S0KA== X-Gm-Message-State: AOAM531SE2y3tzQbtCT2eoqz/wd8YJ6DiDC94vfRLdtovaU4RnNlULLm 4m0+c4+aHz5z2OH1wSpM0KU= X-Google-Smtp-Source: ABdhPJx75PuruEt8qHJ8OOp1bhFr8Ltch/1Qp0AM1JHak/WmoG+fWRy+/rscLLvooLeS3Czxp7l7IQ== X-Received: by 2002:aed:32e7:: with SMTP id z94mr13069624qtd.17.1596789377617; Fri, 07 Aug 2020 01:36:17 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:72b1:8920:da15:c0bd:33c1:e2ad]) by smtp.gmail.com with ESMTPSA id c42sm7846728qte.5.2020.08.07.01.36.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 01:36:17 -0700 (PDT) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: Laurent Pinchart Cc: skhan@linuxfoundation.org, "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/20] media: usb: uvc_ctrl.c: add temp variable for list iteration Date: Fri, 7 Aug 2020 05:35:30 -0300 Message-Id: <20200807083548.204360-3-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Fixes the following coccinelle report: drivers/media/usb/uvc/uvc_ctrl.c:1860:5-11: ERROR: invalid reference to the index variable of the iterator on line 1854 By introducing a temporary variable to iterate the list. Do not dereference the 'entity' pointer if it is not found in the list. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida --- drivers/media/usb/uvc/uvc_ctrl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index e399b9fad757..567bdedc2ff2 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -1842,7 +1842,8 @@ static int uvc_ctrl_init_xu_ctrl(struct uvc_device *dev, int uvc_xu_ctrl_query(struct uvc_video_chain *chain, struct uvc_xu_control_query *xqry) { - struct uvc_entity *entity; + struct uvc_entity *entity = NULL; + struct uvc_entity *cursor = NULL; struct uvc_control *ctrl; unsigned int i, found = 0; u32 reqflags; @@ -1851,13 +1852,15 @@ int uvc_xu_ctrl_query(struct uvc_video_chain *chain, int ret; /* Find the extension unit. */ - list_for_each_entry(entity, &chain->entities, chain) { - if (UVC_ENTITY_TYPE(entity) == UVC_VC_EXTENSION_UNIT && - entity->id == xqry->unit) + list_for_each_entry(cursor, &chain->entities, chain) { + if (UVC_ENTITY_TYPE(cursor) == UVC_VC_EXTENSION_UNIT && + cursor->id == xqry->unit) { + entity = cursor; break; + } } - if (entity->id != xqry->unit) { + if (!entity || entity->id != xqry->unit) { uvc_trace(UVC_TRACE_CONTROL, "Extension unit %u not found.\n", xqry->unit); return -ENOENT; From patchwork Fri Aug 7 08:35:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 256226 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75F36C433E0 for ; Fri, 7 Aug 2020 08:36:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 55C9A22CAF for ; Fri, 7 Aug 2020 08:36:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="udMu3s8I" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727807AbgHGIg1 (ORCPT ); Fri, 7 Aug 2020 04:36:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726511AbgHGIgZ (ORCPT ); Fri, 7 Aug 2020 04:36:25 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FBF9C061574; Fri, 7 Aug 2020 01:36:25 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id c12so720642qtn.9; Fri, 07 Aug 2020 01:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pCOUWfwQGCxx4xFgjgJzdmxB0Ku9U+xacNCA0bE4G4U=; b=udMu3s8Ircb0KhEzwcbUl+bWG0t6TlZ4yD7XGtGLAx06W9xJG+ChSHoS8QExNhTzw+ xJ4cU2B2s1vrXlEqBa0CUM2m6ovQcMMDFkplruuc7N+quTmuvdopwoQLq2a1Akrs693J /sfMpTSp4+TNK/b9IH59SHlRUE7tIdTKZB0FEGlIduU0pBOfierHlhK79k43s630fF5W vizvvLIO0mndB1OwRDG0YMrj2BsWurDE8l+Dp3P/KFx7jZnIJ25RFDnUhyRWid5y759k 986bjo7xZZp/uOHCoAlM/hlhqeqMaRSN2fzjlQf664Dnk3bTyj4kJmuMftVQW3Xzl8EC OcIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pCOUWfwQGCxx4xFgjgJzdmxB0Ku9U+xacNCA0bE4G4U=; b=bmwHRkmA7GVEW4A85ffhzPr+FNKWXqXqe0DE+HZIiTtjQic6nUPnzuVBpv/ch18vem ftdkFvq7bkUtao2kf8k3Ohhyxiu3gzmWulszcHGCBilc5YBFfiWdpuq2+rKPvFvYRFUK +yQM3mqW++hhSvNKE9vlb9mYoIJc7PosSqonX3yvavBxfE3Pkg/I0GjCQsYvAhuKoemx FGO72YCN54jX5n7xVNGR+Oz/4bKsP3PSxsb0TNps/oxDYuiNTacxwn7sYx3jNw46Qm05 pCbgYUdBSjj7lPupQ71bObhhd3BN+AI0eQy5Pl20ADcZRu+YnpyM39NKRFMNFdCcyLOV uDaA== X-Gm-Message-State: AOAM5322xVGUSG5PcIqZ/QqyyJ2YUd1BWFL3a4yXkQruG76hWaNuPjHP umkkY0ou5dGjKyJObrqt9C8= X-Google-Smtp-Source: ABdhPJwdaoeBIf850FLeS5VojFgiOIwoQ2jg8MtkRmkfskN8YOCIayKqkj0kohLNVbJbVEly7fORdA== X-Received: by 2002:aed:2091:: with SMTP id 17mr12775857qtb.322.1596789384704; Fri, 07 Aug 2020 01:36:24 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:72b1:8920:da15:c0bd:33c1:e2ad]) by smtp.gmail.com with ESMTPSA id c42sm7846728qte.5.2020.08.07.01.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 01:36:24 -0700 (PDT) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: Hans Verkuil Cc: skhan@linuxfoundation.org, "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/20] media: cobalt: cobalt-omnitek.c: fix comparison to bool Date: Fri, 7 Aug 2020 05:35:32 -0300 Message-Id: <20200807083548.204360-5-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Fix the following coccinelle report: drivers/media/pci/cobalt/cobalt-omnitek.c:119:5-19: WARNING: Comparison to bool By using "!cond" instead of "cond == false" Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida --- drivers/media/pci/cobalt/cobalt-omnitek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/cobalt/cobalt-omnitek.c b/drivers/media/pci/cobalt/cobalt-omnitek.c index 4c137453e679..01b82a2e8d33 100644 --- a/drivers/media/pci/cobalt/cobalt-omnitek.c +++ b/drivers/media/pci/cobalt/cobalt-omnitek.c @@ -116,7 +116,7 @@ void omni_sg_dma_abort_channel(struct cobalt_stream *s) { struct cobalt *cobalt = s->cobalt; - if (is_dma_done(s) == false) + if (!is_dma_done(s)) iowrite32(ABORT, CS_REG(s->dma_channel)); } From patchwork Fri Aug 7 08:35:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 256225 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44382C433E0 for ; Fri, 7 Aug 2020 08:36:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F9F222CF6 for ; Fri, 7 Aug 2020 08:36:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bZdXLbTY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727837AbgHGIgk (ORCPT ); Fri, 7 Aug 2020 04:36:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727870AbgHGIgg (ORCPT ); Fri, 7 Aug 2020 04:36:36 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A447AC061574; Fri, 7 Aug 2020 01:36:36 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id e5so733758qth.5; Fri, 07 Aug 2020 01:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HM+pB+gegJETUTC8BtYwm1pgwV6KHTLqQbgt5bu8Qq8=; b=bZdXLbTYVurwEC6xi+YPZ4+960RF0X6/+S2xTN/Tf0zaHBVW17eWe5ecjpaP16lWsN xvded1AZrbUdEJ3hHs0s3kubWc/ImbJpNTNz4bUoWoXmepblKlM/STHcNn77pmKKBZh0 vpWQALpZIxUjSOmm988R599fx0pEK/xQDupMf4razT4VZHc3pO3sbGCsKQ87HZmn9JjO IJ4pmFS8NXU/EoV1YJhL/8BhJ7tJvvfEOvpy1WxfyG5xC2so4YfJVc0eUKGSl/VrsnSp q7IYaIVNy6krnJd73mbXGlSJ5Rw0obOILdqr3EaauWUO3CnT5CivHVxNUEbBkHiy0nij /ung== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HM+pB+gegJETUTC8BtYwm1pgwV6KHTLqQbgt5bu8Qq8=; b=BmDL1sxFAVrMAX3mPeZrAlwsS8lEbXqp1teFxx6SWoiwHlYP2Hg91g6ozeuCKZuQu4 pzTK6uArjw2XDr/eqRQectaxN0EZZyh+Eis72D1oxlcH2ZhqGELd/06zR+EHsApitJOq F8S08wYvO+pmHI3h8oVxsTT9TBW8XP4t4M/y6dQb7IPEiAkWzwDs1VsYaJ2qCZEwWIq/ wSib13edYwhjhSZEdoKiMJbA6TbPcP5T5XR+KVYzoMoCVOtgDurDmUPSmZdF5KpaNS4e AevNo71BrqpVWOD9+wyJ9DYRG++etKUberrEr6tdMkvKXxZLPRyFaBVC9yppBE8UaKPH EYuQ== X-Gm-Message-State: AOAM532uLS2Cwwj0X2vZvtuaWBO4O0cs55751wAdlOi+foggjmWBPUGE CyS37hF//j1lCtz21FVMM3RuynIkPzy7+w== X-Google-Smtp-Source: ABdhPJx84MtNtBOV38eDB3Rn3JvX/G2SrLdHXnRjL0jGLfNMWNPZWEsG8T6oQf6oSctneVPkUKilIg== X-Received: by 2002:ac8:7188:: with SMTP id w8mr12952874qto.223.1596789395676; Fri, 07 Aug 2020 01:36:35 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:72b1:8920:da15:c0bd:33c1:e2ad]) by smtp.gmail.com with ESMTPSA id c42sm7846728qte.5.2020.08.07.01.36.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 01:36:35 -0700 (PDT) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 08/20] media: pci: saa7164.c: Replace if(cond) BUG with BUG_ON Date: Fri, 7 Aug 2020 05:35:35 -0300 Message-Id: <20200807083548.204360-8-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Fix the following coccinelle reports: drivers/media/pci/saa7164/saa7164-buffer.c:254:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG. drivers/media/pci/saa7164/saa7164-buffer.c:261:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida --- drivers/media/pci/saa7164/saa7164-buffer.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/saa7164/saa7164-buffer.c b/drivers/media/pci/saa7164/saa7164-buffer.c index 289cb901985b..245d9db280aa 100644 --- a/drivers/media/pci/saa7164/saa7164-buffer.c +++ b/drivers/media/pci/saa7164/saa7164-buffer.c @@ -250,15 +250,14 @@ int saa7164_buffer_cfg_port(struct saa7164_port *port) list_for_each_safe(c, n, &port->dmaqueue.list) { buf = list_entry(c, struct saa7164_buffer, list); - if (buf->flags != SAA7164_BUFFER_FREE) - BUG(); + BUG_ON(buf->flags != SAA7164_BUFFER_FREE); /* Place the buffer in the h/w queue */ saa7164_buffer_activate(buf, i); /* Don't exceed the device maximum # bufs */ - if (i++ > port->hwcfg.buffercount) - BUG(); + BUG_ON(i > port->hwcfg.buffercount); + i++; } mutex_unlock(&port->dmaqueue_lock); @@ -302,4 +301,3 @@ void saa7164_buffer_dealloc_user(struct saa7164_user_buffer *buf) kfree(buf); } - From patchwork Fri Aug 7 08:35:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 256224 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D126C433E0 for ; Fri, 7 Aug 2020 08:36:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15ABF22CF6 for ; Fri, 7 Aug 2020 08:36:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VhA0ICm2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727902AbgHGIgo (ORCPT ); Fri, 7 Aug 2020 04:36:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727826AbgHGIgn (ORCPT ); Fri, 7 Aug 2020 04:36:43 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AAA4C061574; Fri, 7 Aug 2020 01:36:43 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id p4so1064063qkf.0; Fri, 07 Aug 2020 01:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5y9qAO4DMBYJ0COKqkndO8ZCLSN9cFjuTgCIXUypzms=; b=VhA0ICm2JCRZJ+/FkEFW5d2Ae5dyj789jCrDuggOdm30Ku6O5Z0xUk75nleJhOX7Iq sVIs2mDClW8hyZ7E5MyZIdAiIdnv8AOQEKcbLwtVxc2ybnT6fcijViBeyAXUblUS8Msx d7HkApO907x9KFP2V9y7ZD18iXkjz1TD00m+J4+bjR+ZCH2StX9EpdjoOoLP+Vj7S3hp 5LJaHCsRYTtue5i9szy5fHc4CbAzadRvhaZ6tFltDrBy+M46D7aYGcaGRwrmi6Tw33AJ CBsVfdfe/Gc7RA2JPnNeY8AeZO/JMrJAAGJmW/pExbMBjGpyA1PCPKWjYijDg/5hVJeM OnRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5y9qAO4DMBYJ0COKqkndO8ZCLSN9cFjuTgCIXUypzms=; b=Ig4uKpH6daiYSCQBLkWRXQ5C9DwyU8IXw3rSEW1Z6u2WtKtgXW8EhuNqg9CJXsmWwS oJ0JA7F6/nh1EVBYUqSBk/8aqX451jgyQ05YWorJ+69xvfchHI1c0YMZQ4KCA4Ng3BAI G2CYAO4f2FOMjmwq6waSYdZiRXXMHDYgbJjdMwqwFnANYqFHPhmo41ZrjbBASMj3V7Md B3383WSBQAU02R9uhlzYL0oz6IVBtvYNhdWo72Vlb2yuFuf7J39uBF5DgG3+FwSJj0yk 7HsahaXph+gTIjUskG8oRL2N+D8CMhaY/BjQAJ20Vr1XgUyepnizmtrp/S7zURsqTBx/ HsHg== X-Gm-Message-State: AOAM531AomiH8b+eGE78GfXK1Jd8jTk2L3hH9/+voqsWIKMFIzGIvn95 /pYfF3Ay3XXJ4brtxs/fx8MoH0Dng8M= X-Google-Smtp-Source: ABdhPJzl0Xq1KjrcgJoutOuGe0MUlGL0km97T5jykm5DRvq72W/Kw1PElFpLPNNIo4J16c3xoSvlHg== X-Received: by 2002:a37:48ce:: with SMTP id v197mr12858262qka.458.1596789402041; Fri, 07 Aug 2020 01:36:42 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:72b1:8920:da15:c0bd:33c1:e2ad]) by smtp.gmail.com with ESMTPSA id c42sm7846728qte.5.2020.08.07.01.36.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 01:36:41 -0700 (PDT) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 10/20] media: pci: saa7164-vbi.c: replace if (cond) BUG() with BUG_ON() Date: Fri, 7 Aug 2020 05:35:37 -0300 Message-Id: <20200807083548.204360-10-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Fix the following coccinelle reports: drivers/media/pci/saa7164/saa7164-vbi.c:707:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. drivers/media/pci/saa7164/saa7164-vbi.c:760:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida --- drivers/media/pci/saa7164/saa7164-vbi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/saa7164/saa7164-vbi.c b/drivers/media/pci/saa7164/saa7164-vbi.c index 49d61a64c8cb..cb2e09f0841d 100644 --- a/drivers/media/pci/saa7164/saa7164-vbi.c +++ b/drivers/media/pci/saa7164/saa7164-vbi.c @@ -703,8 +703,7 @@ int saa7164_vbi_register(struct saa7164_port *port) dprintk(DBGLVL_VBI, "%s()\n", __func__); - if (port->type != SAA7164_MPEG_VBI) - BUG(); + BUG_ON(port->type != SAA7164_MPEG_VBI); /* Sanity check that the PCI configuration space is active */ if (port->hwcfg.BARLocation == 0) { @@ -756,8 +755,7 @@ void saa7164_vbi_unregister(struct saa7164_port *port) dprintk(DBGLVL_VBI, "%s(port=%d)\n", __func__, port->nr); - if (port->type != SAA7164_MPEG_VBI) - BUG(); + BUG_ON(port->type != SAA7164_MPEG_VBI); if (port->v4l_device) { if (port->v4l_device->minor != -1) From patchwork Fri Aug 7 08:35:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 256219 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38E88C433DF for ; Fri, 7 Aug 2020 08:37:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1833E22CAE for ; Fri, 7 Aug 2020 08:37:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bZw7nImC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727932AbgHGIgv (ORCPT ); Fri, 7 Aug 2020 04:36:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727911AbgHGIgq (ORCPT ); Fri, 7 Aug 2020 04:36:46 -0400 Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5149EC061574; Fri, 7 Aug 2020 01:36:46 -0700 (PDT) Received: by mail-qv1-xf41.google.com with SMTP id l13so388731qvt.10; Fri, 07 Aug 2020 01:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=p7yN8/UE3bmxOW+3sD/+cxzuqhvnsobCII+RkxMM1Yg=; b=bZw7nImC6/ipXeOhcJmSKB+4cpDo0r3NGPtVqM6dihgN1UrZe08HuYbwuRsnME/d8o sDPTUTjJkKERPTgCarXGozrCtd0if81vn94ZMSaFSB8UjvAX4cOuD/er1P0bijA14ynw jg8qHynJwbiERmU9NyJ9hmvN/BLRy+mYEDP0FgY61ihN1uhA6+orGMrTpoyPF0XzCwel 9W6y8Hp7nLp11+Cx9Hme9PoHydhAq4mfb2jX09IOr3gAYlEdufWV9nCgCrRkfVeIcam3 GUT2pRaEG9UMPefZVWU0LiCdd+syTHovyMjuLIxSCLRS9SeakHnaazncPGYhE4RkMaOn CJ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=p7yN8/UE3bmxOW+3sD/+cxzuqhvnsobCII+RkxMM1Yg=; b=iMqFSd/303uit+hAQaC9EaCW/rueBERuDBWNXZrs3ST7QYScHc/aX/OHRVQarTD1Fa ByIRrXDk6u4MkDeLAx5aRiPkJKYpNYQm/AnQXGKM1V6+z8Ia0nxbIrlW2eXfw28m+dkQ C9uWYb5rS18ocec8aPbCbRF1RcY3+aqM27z8qrKSOvEztM7aqEG997Y3d/2Agq/3+7Jo r2qtjt/Yr2fYZYZWBd0HUxNwlYI58sQkhpMwPUCGfuonM9RjPkNWPRragj8z69WwCY0p C7O4L8193PkQlgvGkY3LMOgpr+0Z/yWrPLsEc+Gv9FZeBPUnS7QqfFsdw9AWpSf39RXm f8ew== X-Gm-Message-State: AOAM532A1IF+RD/94GUXc2Lolxd2U2pX0zyJFwEc+YPwDat7duXt4yQj e69zLFYDXzA16LtxwlymWzAOpTOn2Bg= X-Google-Smtp-Source: ABdhPJxONuOawZin2ouaz4dvQaXyVGtBCE461GSTu3Z9ZipJKIbgKfblnk7vxOYvYc5cb7KDyx7Lxg== X-Received: by 2002:ad4:4c0a:: with SMTP id bz10mr12947607qvb.78.1596789405238; Fri, 07 Aug 2020 01:36:45 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:72b1:8920:da15:c0bd:33c1:e2ad]) by smtp.gmail.com with ESMTPSA id c42sm7846728qte.5.2020.08.07.01.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 01:36:44 -0700 (PDT) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 11/20] media: pci: saa7164-core.c: replace if (cond) BUG() with BUG_ON() Date: Fri, 7 Aug 2020 05:35:38 -0300 Message-Id: <20200807083548.204360-11-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Fix the following coccinelle reports: drivers/media/pci/saa7164/saa7164-core.c:579:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. drivers/media/pci/saa7164/saa7164-core.c:592:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG. drivers/media/pci/saa7164/saa7164-core.c:898:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida --- drivers/media/pci/saa7164/saa7164-core.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index 50293396658c..1d6f6667951c 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c @@ -575,8 +575,8 @@ static irqreturn_t saa7164_irq_ts(struct saa7164_port *port) /* Find the current write point from the hardware */ wp = saa7164_readl(port->bufcounter); - if (wp > (port->hwcfg.buffercount - 1)) - BUG(); + + BUG_ON(wp > (port->hwcfg.buffercount - 1)); /* Find the previous buffer to the current write point */ if (wp == 0) @@ -588,8 +588,8 @@ static irqreturn_t saa7164_irq_ts(struct saa7164_port *port) /* TODO: turn this into a worker thread */ list_for_each_safe(c, n, &port->dmaqueue.list) { buf = list_entry(c, struct saa7164_buffer, list); - if (i++ > port->hwcfg.buffercount) - BUG(); + BUG_ON(i > port->hwcfg.buffercount); + i++; if (buf->idx == rp) { /* Found the buffer, deal with it */ @@ -894,8 +894,7 @@ static int saa7164_port_init(struct saa7164_dev *dev, int portnr) { struct saa7164_port *port = NULL; - if ((portnr < 0) || (portnr >= SAA7164_MAX_PORTS)) - BUG(); + BUG_ON((portnr < 0) || (portnr >= SAA7164_MAX_PORTS)); port = &dev->ports[portnr]; @@ -1566,4 +1565,3 @@ static void __exit saa7164_fini(void) module_init(saa7164_init); module_exit(saa7164_fini); - From patchwork Fri Aug 7 08:35:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 256220 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 165BBC433E0 for ; Fri, 7 Aug 2020 08:37:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E716322D07 for ; Fri, 7 Aug 2020 08:37:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uzMEy6rN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727977AbgHGIg5 (ORCPT ); Fri, 7 Aug 2020 04:36:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727911AbgHGIgw (ORCPT ); Fri, 7 Aug 2020 04:36:52 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F295C061574; Fri, 7 Aug 2020 01:36:52 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id x12so744672qtp.1; Fri, 07 Aug 2020 01:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DUE252qTwG6pYCLxjiyv/ngOQ0xR7QYJFaL87GF2sMY=; b=uzMEy6rNW2UaFlJZyVl+dFCikep4y4iCyWPwSLeedw5+0Zudh7C8AIV5VdwlPZ0844 O7OEZjk1utvDHFmE4g+cNycNmzcjeRhZbzw1vO5QxVzYyX26IeVWU6zeD5R7XTl1EIb1 Pbt4nDYd5zhUfj1QNKHVu9Xg/izSwD6D94lIcMkYIdMAxT0GpRpS2W/+6YfPcBCyWCi7 lQYsOWTiq9T91YfUy6kKE/alB+Ipwf/n5OWkOcQWhTLGA7jetmICv4r/aeTSlbxr0k0X +1nwO90NkKlBJbyYAV9EePOXmZPzijcRmgr8n8zNadRfJXE55gN+Icm94LiaoX88kumQ mrQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DUE252qTwG6pYCLxjiyv/ngOQ0xR7QYJFaL87GF2sMY=; b=Yij9PKhhXaC1hoPqMM+zOBDw/Y8+hCAAjkMdWZjBxU8En2jW2OGbGDXEAZmPjM5Y4g ThzJoMY/nwPuK+Kne+le3YHocQG/unaCqQ1G92uZacM+JUEWiTL+w6bTbH10ZhU+BYIp V/UDXqxBL+mNWnfFlnjpfettMRlj73xbAol6DKlbbbWaFRdjmDohKtU8kV42xIuNSezq n4Izw6r2+ilDynVKI2MN6bwiDiBYrP5SOe3co2mZr48BL774MFP5RijNY8mGD8spSnY2 xE14uKKE3KG2aCKUmFQbJEUJ7xL5dzpWAgnNp+uywF5UzjIQbFK1oYZlG/Opg5wIErvJ o+1Q== X-Gm-Message-State: AOAM532SAhGqqgAmbyTB0gQqJHVwwilPfBuuBtfDrEYrvNtolzVlaxob ocTRp0XrevUDqliY8c+/pD1xEkHdI8s= X-Google-Smtp-Source: ABdhPJwVt3BU8XXqA5PKNiPH9oOQgti5GL6+F3B0ymJfTvmoLaDFuU4c06USRyBWcKq7kD29+q895A== X-Received: by 2002:ac8:42ca:: with SMTP id g10mr13471874qtm.219.1596789411530; Fri, 07 Aug 2020 01:36:51 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:72b1:8920:da15:c0bd:33c1:e2ad]) by smtp.gmail.com with ESMTPSA id c42sm7846728qte.5.2020.08.07.01.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 01:36:51 -0700 (PDT) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 13/20] media: dvb-frontends: mb86a16.c: remove useless if/else Date: Fri, 7 Aug 2020 05:35:40 -0300 Message-Id: <20200807083548.204360-13-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Fix the following coccinelle report: drivers/media/dvb-frontends/mb86a16.c:1455:6-8: WARNING: possible condition with no effect (if == else) Both branches are the same, so remove the if/else altogether. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida --- drivers/media/dvb-frontends/mb86a16.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/media/dvb-frontends/mb86a16.c b/drivers/media/dvb-frontends/mb86a16.c index 3843181bba16..2505f1e5794e 100644 --- a/drivers/media/dvb-frontends/mb86a16.c +++ b/drivers/media/dvb-frontends/mb86a16.c @@ -1452,11 +1452,8 @@ static int mb86a16_set_fe(struct mb86a16_state *state) wait_t = (786432 + state->srate / 2) / state->srate; else wait_t = (1572864 + state->srate / 2) / state->srate; - if (state->srate < 5000) - /* FIXME ! , should be a long wait ! */ - msleep_interruptible(wait_t); - else - msleep_interruptible(wait_t); + + msleep_interruptible(wait_t); if (sync_chk(state, &junk) == 0) { iq_vt_set(state, 1); From patchwork Fri Aug 7 08:35:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 256223 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DE6AC433DF for ; Fri, 7 Aug 2020 08:37:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B87322D00 for ; Fri, 7 Aug 2020 08:37:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HDgkuECL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728000AbgHGIhA (ORCPT ); Fri, 7 Aug 2020 04:37:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727987AbgHGIg7 (ORCPT ); Fri, 7 Aug 2020 04:36:59 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FF5FC061574; Fri, 7 Aug 2020 01:36:59 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id s23so710882qtq.12; Fri, 07 Aug 2020 01:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hQh9vJ8qL7le/6UsFdBNNlZw71ZngpGJl8n3+9IJZGM=; b=HDgkuECLCWdP831R9shd1Dd4qBzLAP3roMHtzLmA+Tz3Q8BlRrmQ7YzLbQZeNFiwUo dWMB/QScPgYAkiqiW0Tt01rFcqymYC8fFc+5a2f5dS/OkyPZKKJMHCzH1xCljnPFWVgq i5RORXVr2fNU2EdqBMuf4+qgzbgxU7dAtwhnhbpV2tL5iSS42i2FA9nSKBZqr0r5hFq9 p5z+yFpvitqwwGkTCOWPGVnuNlGqyGPxlXNiZI4j79YeUKoNmWNnlQSmGuNl3FmhF5uY MA5PC+i9PFIBtkCRn9hmLrW1fNykiANjWRJiCBYxrkqN0YO6siC/gcJNipJMfFUf6tAL wnOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hQh9vJ8qL7le/6UsFdBNNlZw71ZngpGJl8n3+9IJZGM=; b=J0LfnsWv38c0Sa1QwE6iwlgOWp9vTAuXlA88Nbkq+gpBMXmx2F2KTIwXGTqLfrP62f 8djJRzDFZdd7RwBIguXQUdgdfDRkitAUYsKDzn1ciD7srIQX8CoPjVzGbNZtx0gVYypt hDQCPzRYHfmhtxHv9JpZarze3Jjp8OG1RHaHKGCKJPWSSk5Hh/KGrpKbeaKdwU/OtVmw fCKUn1OXsLQXLZfjJt7K8YjbYqbhDHi1mKz6NJZOtM9DUA3sIRsNsSMkYQ52XkPZSyjN JIJbnnmIXGDpp/vBZXf2kBRbT2VSEIJ8NBv4+epbc2M2cmll2823S399OoMC1by/yIvr zXXQ== X-Gm-Message-State: AOAM532rH+yAKba+MtJks/3DdUohjJIjqDr7vTFlRwgdaZrJXlh+Rb2x ODj7XDM66lWIdp5qdp/K04UjnVmRqXk= X-Google-Smtp-Source: ABdhPJxKV6/gqTIu2lJakDUq+jGgkp210KlhpKKuuiTVI9CdEfS7fgxQu1rQSdi7wXYCbG076Ilq0A== X-Received: by 2002:aed:3aa5:: with SMTP id o34mr13559045qte.359.1596789417960; Fri, 07 Aug 2020 01:36:57 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:72b1:8920:da15:c0bd:33c1:e2ad]) by smtp.gmail.com with ESMTPSA id c42sm7846728qte.5.2020.08.07.01.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 01:36:57 -0700 (PDT) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 15/20] media: pci: cx23855-video.c: remove duplicate argument in 'or' Date: Fri, 7 Aug 2020 05:35:42 -0300 Message-Id: <20200807083548.204360-15-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Fix the following coccinelle report: drivers/media/pci/cx23885/cx23885-video.c:639:24-44: duplicated argument to & or | V4L2_CAP_VBI_CAPTURE appears twice, remove it. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida --- drivers/media/pci/cx23885/cx23885-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index 440d108b7ddd..a380e0920a21 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c @@ -637,7 +637,7 @@ static int vidioc_querycap(struct file *file, void *priv, sprintf(cap->bus_info, "PCIe:%s", pci_name(dev->pci)); cap->capabilities = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING | V4L2_CAP_AUDIO | V4L2_CAP_VBI_CAPTURE | - V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VBI_CAPTURE | + V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_DEVICE_CAPS; switch (dev->board) { /* i2c device tuners */ case CX23885_BOARD_HAUPPAUGE_HVR1265_K4: From patchwork Fri Aug 7 08:35:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 256222 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AE69C433E0 for ; Fri, 7 Aug 2020 08:37:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67BB022D00 for ; Fri, 7 Aug 2020 08:37:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R8d1jdSU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728038AbgHGIhH (ORCPT ); Fri, 7 Aug 2020 04:37:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbgHGIhF (ORCPT ); Fri, 7 Aug 2020 04:37:05 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD9D3C061574; Fri, 7 Aug 2020 01:37:05 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id e5so734311qth.5; Fri, 07 Aug 2020 01:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Cjcm36AvnfDFsuVsTiC9gQnjUW8TNDAUzbXM337fp6M=; b=R8d1jdSU8OSvGvoHM0NM7xy4wg9PyGd5N9F6Pg/OFsy876f2sT/70Jtb65Ii5wex3c oZLorEInZEnAa4Ik3krkehyQEoxDt3z8MRVH4KwBlF4iUvPF6OxQDu25pe20Ly+2FSJn j9RNaWnCsGSko2Ei3iZ/W4S1pUWZrTAaNxDUIzklh96ELeuMmtiR4AGa/3Rm8d+5LHYh Zp5gpOnkfrJpgLoQ/n700o9hxWeIA5nxelGv+wzSGd4O+wmxgVKAR3XqdILzfQEYF5cZ t7GDmo13z00NsE3l2EqNauqWAbC7kIJMv9PpEBR9vsZYGMKA89Qatl8EVt7b05HeiMj7 mVIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Cjcm36AvnfDFsuVsTiC9gQnjUW8TNDAUzbXM337fp6M=; b=TDnMFATmxtc4jyRPWDFp58ISCISdfePaabWAywY6+pa/EgH+X2+EIQCMuE7M0SqSBi D227E8jO2efGAt9SkvRWTSQLtwQf+Wpf6xtQN6GbLyk0CGUtAA+Pa/uffxlKcMVsZKxD otGAKmzzhRhRK+wL3pzZMCckPQ70LmmPdLXaK2bqchptsEI6EY2h51JtwN/I4rb4lLGB Cp9CvJtrUjXysbgEIGDOpH51qrAGlHpqPTeEZmyl0zoErCHxQtZFzTiLyy8Rbq+kBZ1U +gMF//ermgr9Dp9s0pwOEDc3kqDRUZ3muwhIeY5nQGoMVdTi/0LtAHMoIyHhvjLNjjkP aVoQ== X-Gm-Message-State: AOAM531qGDhplkneFJ0B6n5s5QLQcNqX9WGAszgJaAr5JunQ2JzKNEL7 hoC6T5kZF1Y+Jl4jCh8MOVE= X-Google-Smtp-Source: ABdhPJzAKF+nzvu6Pxx7efzL+AuCIggi+ivNPuqOYHhwzXwydOr6ve4uOGr33g6tNEvtBZUkVaGV8Q== X-Received: by 2002:aed:364a:: with SMTP id e68mr12710245qtb.260.1596789424782; Fri, 07 Aug 2020 01:37:04 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:72b1:8920:da15:c0bd:33c1:e2ad]) by smtp.gmail.com with ESMTPSA id c42sm7846728qte.5.2020.08.07.01.37.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 01:37:04 -0700 (PDT) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: Tim Harvey Cc: skhan@linuxfoundation.org, "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/20] media: i2c: tda1997x.c: Fix assignment of 0/1 to bool variable Date: Fri, 7 Aug 2020 05:35:44 -0300 Message-Id: <20200807083548.204360-17-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Fix the following coccinelle reports: drivers/media/i2c/tda1997x.c:911:6-21: WARNING: Assignment of 0/1 to bool variable drivers/media/i2c/tda1997x.c:939:2-17: WARNING: Assignment of 0/1 to bool variable drivers/media/i2c/tda1997x.c:947:4-19: WARNING: Assignment of 0/1 to bool variable Replace assignment to 1 with true and assignment to 0 with false. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida --- drivers/media/i2c/tda1997x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 5e68182001ec..483cc19ed75d 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -908,7 +908,7 @@ tda1997x_configure_audout(struct v4l2_subdev *sd, u8 channel_assignment) { struct tda1997x_state *state = to_state(sd); struct tda1997x_platform_data *pdata = &state->pdata; - bool sp_used_by_fifo = 1; + bool sp_used_by_fifo = true; u8 reg; if (!pdata->audout_format) @@ -936,7 +936,7 @@ tda1997x_configure_audout(struct v4l2_subdev *sd, u8 channel_assignment) break; case AUDCFG_TYPE_DST: reg |= AUDCFG_TYPE_DST << AUDCFG_TYPE_SHIFT; - sp_used_by_fifo = 0; + sp_used_by_fifo = false; break; case AUDCFG_TYPE_HBR: reg |= AUDCFG_TYPE_HBR << AUDCFG_TYPE_SHIFT; @@ -944,7 +944,7 @@ tda1997x_configure_audout(struct v4l2_subdev *sd, u8 channel_assignment) /* demuxed via AP0:AP3 */ reg |= AUDCFG_HBR_DEMUX << AUDCFG_HBR_SHIFT; if (pdata->audout_format == AUDFMT_TYPE_SPDIF) - sp_used_by_fifo = 0; + sp_used_by_fifo = false; } else { /* straight via AP0 */ reg |= AUDCFG_HBR_STRAIGHT << AUDCFG_HBR_SHIFT; From patchwork Fri Aug 7 08:35:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 256221 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BA56C433E0 for ; Fri, 7 Aug 2020 08:37:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 68AA022D00 for ; Fri, 7 Aug 2020 08:37:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H3y29rNH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728068AbgHGIhO (ORCPT ); Fri, 7 Aug 2020 04:37:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728061AbgHGIhN (ORCPT ); Fri, 7 Aug 2020 04:37:13 -0400 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2D83C061574; Fri, 7 Aug 2020 01:37:12 -0700 (PDT) Received: by mail-qv1-xf44.google.com with SMTP id t6so406503qvw.1; Fri, 07 Aug 2020 01:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BzKR9fHjZx1AaQExoBve0sSYuiasNViTLdv1o+mD+6Q=; b=H3y29rNHBwvSlWePlB/j3lgL0GjywETBOcirj8u4yKtxpdyL3bfjuzj1jNQ5EEbIun yhuCUnuG1aS3fZd5k7Ll4pnVuJ/Lut2dxUG3V4WAYa9n3k+AFbapYGVfbvzJTPyGwf3x hVZgn2zlMhyv2vEvd/QwgvwRLDpfeGQGJyFilALVa8YkBuhRaHznJew8B+qNMNfuDHyc aGyswHBFi65Nzq8yIpvnrdufwDnYODviRJBL8w3qT/JqAtQ35Dq8KZ+hTvowLeHDG9s1 MgfZDBqal0gzosrEpu724SkueW2C+0n47rBuuwq8FBmACGHdaD8m2raBsXY1fMgoyFYW Qjdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BzKR9fHjZx1AaQExoBve0sSYuiasNViTLdv1o+mD+6Q=; b=WIdCUUsMwNK0iaeZ3IhPXaI7m9ooZ7Yooft5koBC/3r8bOwKsujJplbAZeifE+J/m9 bo11fxGkRHnr0ETPJ5qvVbPfN159lR+yfa+hyqjHTMXIs9pO3oSyrMK6Wz+KffMIn+J5 tYeu8HSkwLZbEDa/I9fEKAwFzXCNMSpgqdYFryMdhK8n2XK1oLKdMFwjHdUIXbOvhyv1 XzfMLfqGSAQ/R+ycfdfYsz0HeS0bSC6AUrrK/1T1u3uuHugPFNT4BTqY2QU3kRn/ssvE FvxWqbvQ/+XSyJpSiLqk+6lNBFIIEZ4vAMpP3WeTb/u7DTu9y5PUEj1eiab10FdHHmZd 5+pQ== X-Gm-Message-State: AOAM533ZHYk8jQZtKx/KANveEpWmf9tw0lXVT3CYH/SoYysR6mQgXX54 i3wmthtlatg/kXLcr4oV7+s= X-Google-Smtp-Source: ABdhPJyPXSw1O5XN5M+Y93vNG6SmqTGTE+fS2tcUjgOTE1aFXJcHY99JP5iwSURFXJyCOfKPclrqbw== X-Received: by 2002:ad4:54d4:: with SMTP id j20mr13485713qvx.6.1596789432215; Fri, 07 Aug 2020 01:37:12 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:72b1:8920:da15:c0bd:33c1:e2ad]) by smtp.gmail.com with ESMTPSA id c42sm7846728qte.5.2020.08.07.01.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 01:37:11 -0700 (PDT) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: Benoit Parrot Cc: skhan@linuxfoundation.org, "Daniel W. S. Almeida" , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/20] media: platform: vpdma.c: fix comparison to bool Date: Fri, 7 Aug 2020 05:35:46 -0300 Message-Id: <20200807083548.204360-19-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Fix the following coccinelle report: drivers/media/platform/ti-vpe/vpdma.c:946:5-26: WARNING: Comparison to bool Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida --- drivers/media/platform/ti-vpe/vpdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c index 2e5148ae7a0f..de600ffffbbc 100644 --- a/drivers/media/platform/ti-vpe/vpdma.c +++ b/drivers/media/platform/ti-vpe/vpdma.c @@ -943,7 +943,7 @@ int vpdma_hwlist_alloc(struct vpdma_data *vpdma, void *priv) spin_lock_irqsave(&vpdma->lock, flags); for (i = 0; i < VPDMA_MAX_NUM_LIST && - vpdma->hwlist_used[i] == true; i++) + vpdma->hwlist_used[i]; i++) ; if (i < VPDMA_MAX_NUM_LIST) {