From patchwork Fri May 29 20:00:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 209686 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=-9.8 required=3.0 tests=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 B5327C433E0 for ; Fri, 29 May 2020 20:01:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F62520897 for ; Fri, 29 May 2020 20:01:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728223AbgE2UBL (ORCPT ); Fri, 29 May 2020 16:01:11 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:37863 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728062AbgE2UAv (ORCPT ); Fri, 29 May 2020 16:00:51 -0400 Received: from threadripper.lan ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MkHEN-1jGNZx1rr7-00kj3D; Fri, 29 May 2020 22:00:40 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Sakari Ailus , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Arnd Bergmann Subject: [PATCH 2/9] staging: media: atomisp: declare 'struct device' before using it Date: Fri, 29 May 2020 22:00:24 +0200 Message-Id: <20200529200031.4117841-2-arnd@arndb.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200529200031.4117841-1-arnd@arndb.de> References: <20200529200031.4117841-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:TarMTBYqeIin+lnZ4LmtumzaUlpm/qpb9KM44D2gAllthm2qRrv sC59cp8NfYINafBl2Vdc62hWHo8PDCDo5gs0KXVFJdxzbDBwGr4kaKkbTYcUeIN0dbHDuoz x+49RaodJ9WvlUyCSTRvFKe7lQKlToCkknwxWKJl5seuW//ppuMJfKGprZ3FdStSX5dMU0A 9jyc66JdrDYJbBpjyGtng== X-UI-Out-Filterresults: notjunk:1; V03:K0:agZbiHQ3QcI=:7qYJ0h5aCaOWsSDNrfq5CH qaSr3TmIoq2uEzVm8Q7EqUphclJUPPAOLl4X9InIsqvKpB/MO6s6tK7c6/oFcxLuCEhrufKts rQhxrNL/DMp+rVq2OHDexV/7svguarZHyvz/aL/kvxF+EeaGeORpdobYZ8Umt+BnPBSFJCU2X ID5vVJpkDdEAGHNtZI4amT7klgTwhc26+FEvCBxUG62XtIIs1vXbYFr6Ux25buwq8qX363OKM ELr+FHf1xwaybM/zakqPZStMWMWl+dovCRCEIT65T9l977Su/eq6+wk1sBe1vbkYZYuGY4J11 G6AVkYWewWpiMKaGj5IOlAKINVKBjMxBley9rYMhC/jwSEwJyX2U3ecpYzK9/Vp4ZzNDdCZRg En9kgVOksCPW2MU1+xscYSqz65A7PlaELeuk7iRYe4DWjJU6o/gPlzOT+zKi01rMmbFtzHA2y +nX2ALvZOplgWBWgqroORiZZkkc8KOi1vQO/2vht/UNAS/JyvINYVaCClu5kpvnF0DGLvlSKg 2oyYb+p/IAvi7W/CF1DjQK8tTw0suXiX6hk55fxTr34BheDzFfVqMmmAciDThPBWmqKTUxJcp QBswMwwhZcID8mDzAUtl+4IAOF4GyD44+txsmQe2vmFVGxb+ayQ2bYho1A1pPranfCgarRjy6 6z59byyo8t+fD40ar3uOqJX0+M9Ifqdi9QLtid2FrBBoj5omZbVM6QvAzcuVLNkq9E//x5H0q Be08aE3Oy/+iIgHrnah8QttnzCe8lPPW6uzS1x/36ZAe9KVnGZ6XBkvDEZihRf9P5bSq1EFuI 7IWstP1FHkMkbUL5HAqq9Yi8KKU8GtFDYlUGR4OxKuDJolWZeA= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org In some configurations, including this header leads to a warning: drivers/staging/media/atomisp//pci/sh_css_firmware.h:41:38: error: declaration of 'struct device' will not be visible outside of this function [-Werror,-Wvisibility] Make sure the struct tag is known before declaring a function that uses it as an argument. Fixes: 9d4fa1a16b28 ("media: atomisp: cleanup directory hierarchy") Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/pci/sh_css_firmware.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/atomisp/pci/sh_css_firmware.h b/drivers/staging/media/atomisp/pci/sh_css_firmware.h index f6253392a6c9..317559c7689f 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_firmware.h +++ b/drivers/staging/media/atomisp/pci/sh_css_firmware.h @@ -37,6 +37,7 @@ extern unsigned int sh_css_num_binaries; char *sh_css_get_fw_version(void); +struct device; bool sh_css_check_firmware_version(struct device *dev, const char *fw_data); From patchwork Fri May 29 20:00:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 209687 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=-9.8 required=3.0 tests=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 151D9C433E4 for ; Fri, 29 May 2020 20:01:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F419C20DD4 for ; Fri, 29 May 2020 20:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728166AbgE2UA7 (ORCPT ); Fri, 29 May 2020 16:00:59 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:40545 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726866AbgE2UAx (ORCPT ); Fri, 29 May 2020 16:00:53 -0400 Received: from threadripper.lan ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MvbO4-1ipghK3Ghq-00saMm; Fri, 29 May 2020 22:00:40 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Sakari Ailus , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Arnd Bergmann Subject: [PATCH 3/9] staging: media: atomisp: annotate an unused function Date: Fri, 29 May 2020 22:00:25 +0200 Message-Id: <20200529200031.4117841-3-arnd@arndb.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200529200031.4117841-1-arnd@arndb.de> References: <20200529200031.4117841-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:lfZ3e7lRj4Ybe7StyQFbwkg2UGWjMbId3/8VrkKq0pNLWCLtM32 kC18Il1MDaISgD8gL2sMI5OwZFnVA3Rp33VA5sfA/Q7v/zYyARV33SRjZVjcGToRqQsksR5 KzWi9fEMSZvDjbXjeXC4SnaJQNdaCvhSbb99ZlJqDMlLiXk9jIhHcedSRmM/hNHAvuF0OTP t2vLHRR7riPg7pNu9GOXw== X-UI-Out-Filterresults: notjunk:1; V03:K0:+LkRWSfmL0E=:9l56I5kcdmKr3QZXmDnZ+S sXoyK6fxxiDQqDFYRgOZG2PDT38WNHL+fT4N0cyDhyxZ4bsn77lxBIDZ31hbz3aM8pQ0DgzXK rovnECe6vjyY2EnMqLW62m45LXfkPeJ/hyTQ96DYeDNdWNFQof98gkgpEMlMVgQ4yimM5fIbC Qhv4IDC+Sx/28RHUQduOzPVCauzNO3zTnm3HyYj9+b5FSUJakM9WfHP2SWtW7+iNuRUs7JcEd QlZLrH+IADO71tIplE+RSZITLkv6YlQH3ccpo7CEBx+MXImuJWD5deMVvVKKGzD+IFhjg8nPn e/m2nQion0ZiG5uVTKvBdNxwjVhGw4noq4xdvayzpCgjjU4P4ZtUhUfIWs5qkxFRK6ymof5Me SKpsU/bV/yROi3suZ3+Z3Irscj5+UrIm1uUfudlpYAvb5qMUOtxMixamm51+lWJylZqFaSfGY gOFfr21E/HeWSr8IRE6+MUjXGaycqP9gwBEnGtpo89kk7tHdDdoeSbFK32BXB4llhRfNU8Anh 2P7352T7x4aTMG1aj9lSUhXv8IM/IMWCuKrsbm1Rl4h52PZAZor/fRo6fqfsguCY/nil7xaxa 6PlYDAvOdVDjaN4JcyvOK33SLdNQlJSPaZMIraTwRpn3HIkyP1h74NRReHH2lWgJ7eFZLCfEc bF8eHDs7hMIrsall0NEeNunR8yKDu/k7EHvejkji6GpHpl7aVFE37fEiuu3n8zs6c2UKSofRn z6tyFC9id+MrlOQLkqqoeEzmtEG6POwljWd0GxEJvar1K+zhPo4Ra7SHUrkyQCalwrJ9TGg4o 3n+z/OwgfyZ88xgp90YW//B2L/jkaQ3Fh1dLg0ZoJtaVp5icug= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org atomisp_mrfld_power() has no more callers and produces a warning: drivers/staging/media/atomisp/pci/atomisp_v4l2.c:764:12: error: unused function 'atomisp_mrfld_power' [-Werror,-Wunused-function] Mark the function as unused while the PM code is being debugged, expecting that it will be used again in the future and should not just be removed. Fixes: 95d1f398c4dc ("media: atomisp: keep the ISP powered on when setting it") Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c index 694268d133c0..10abb35ba0e0 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c @@ -761,7 +761,8 @@ static void punit_ddr_dvfs_enable(bool enable) pr_info("DDR DVFS, door bell is not cleared within 3ms\n"); } -static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable) +static __attribute__((unused)) int +atomisp_mrfld_power(struct atomisp_device *isp, bool enable) { unsigned long timeout; u32 val = enable ? MRFLD_ISPSSPM0_IUNIT_POWER_ON : From patchwork Fri May 29 20:00:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 209684 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=-9.7 required=3.0 tests=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 EFAB7C433DF for ; Fri, 29 May 2020 20:01:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE9E2207BC for ; Fri, 29 May 2020 20:01:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728244AbgE2UBV (ORCPT ); Fri, 29 May 2020 16:01:21 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:46469 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727975AbgE2UAt (ORCPT ); Fri, 29 May 2020 16:00:49 -0400 Received: from threadripper.lan ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MyK9S-1imwbt0Oxo-00yeuk; Fri, 29 May 2020 22:00:41 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Sakari Ailus , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Arnd Bergmann Subject: [PATCH 4/9] staging: media: atomisp: fix a type conversion warning Date: Fri, 29 May 2020 22:00:26 +0200 Message-Id: <20200529200031.4117841-4-arnd@arndb.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200529200031.4117841-1-arnd@arndb.de> References: <20200529200031.4117841-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:qWBqLiHAEPDMF8js3BlDSPtIsv7NefuRl9Ih3YXihEz3ytqwK7I 95pwIVpN2VK2c6MErMz1nU1mqoSwXJZ4oreJOy0xL2phOWMHcUrB6rNLLn3e/qEBBzYsS81 tCgb/sdTaV85b0SQpiut7Q2R2d230ZF+dUvb77YsIW7R1Uz+1iRLVu9ZEj+sAJOEKZN3QeP Y9Z7KixTphCsicYvRwfpg== X-UI-Out-Filterresults: notjunk:1; V03:K0:ElPwMuZ6EYA=:0afz9AlQbCrElA4/wPvPtt I8ZVINFuuOu0sb0PG4sb88XGYuSFmLYxK911LA6eDkfXasPoS5F0s+NL6Fcg4ExHQIMpOijg4 YBr0uyt7M/yh+nEFrnEmk60iNgmBumR4US/B+RrKhJ4wLeM73A9MU7OcAhRegL4sdtQhO1B6l Nls2QL0fKd2PBW0R/IDTen/u0pfGjJ7AW0eW/022wQaW7dpHKCXqgwFbORCECWTjAkZNgXK8s RioqNoWlKhifzzPbSSFw0zg0TEtL2xoa8bCICFUjV9k1AFHhJrii1aj8VJUUG+IhGcrCxpg7R 8b1nABsEqSYDyb1aQU1IZsklEjVEOip6Pa0XV6qzLYxIlMaMLzNnsLG0js7E8VvLkxkQuNZJL BoQ7DayVfuIkT/iA/xioZ9xSUzJy3Z0KCoX7KQzWFWe6tFdtS5h70i3xlZ/068EAZJeWuy1mx 2M59u1tri8c8dJpM54fAJQLixVfN91s2DkEO2z7GimRUaIulBeUH/XxZX4jysiiJAZf4UecCQ vRyja1RjxpbWLDX/WPOc+Jus3RKAnleTwgHjJ+FHUnQMT4dH+gNhxzGq0T9Ft17w0q3YuC04s x+SIvCPSzL799skAtJDgxPqKuXyOScaj/SldgErWCTrpwEFDuSIMUo70DOGsHh+XGwus1gk5n K7hfDKlSvK9TA3wBueZX1Puke5NcxdlXFt5z+kG1ZI6vLiSi1W16RSAdXdeDn9MRqXGTKt36d 21eLKPhNBs88rTvd8mnZjBT7Q/Dcwcys8bhN4wFy7n1leMS0otcgwuFd4JzrrLcXBV41TTMHw q2n7yBgknNPAruPsYYXpqqrDRw35/ewn//GLRvDMyVE1/UF5i0= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org clang complains that the type conversion in the MAX() macro contains an implied integer overflow to a signed number: drivers/staging/media/atomisp/pci/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c:129:35: error: implicit conversion from 'unsigned long' to 'int32_t' (aka 'int') changes value from 18446744073709543424 to -8192 [-Werror,-Wconstant-conversion] As the conversion is clearly intended here, use an explicit cast. Fixes: 9a0d7fb5ece6 ("media: atomisp: simplify math_support.h") Signed-off-by: Arnd Bergmann --- .../atomisp/pci/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c index a9db6366d20b..613bace0522a 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c +++ b/drivers/staging/media/atomisp/pci/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c @@ -126,7 +126,7 @@ compute_blending(int strength) * exactly as s0.11 fixed point, but -1.0 can. */ isp_strength = -(((strength * isp_scale) + offset) / host_scale); - return MAX(MIN(isp_strength, 0), -XNR_BLENDING_SCALE_FACTOR); + return MAX(MIN(isp_strength, 0), -(unsigned int)XNR_BLENDING_SCALE_FACTOR); } void From patchwork Fri May 29 20:00:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 209688 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=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 A3436C433DF for ; Fri, 29 May 2020 20:00:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B7E520DD4 for ; Fri, 29 May 2020 20:00:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728111AbgE2UAx (ORCPT ); Fri, 29 May 2020 16:00:53 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:54787 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728064AbgE2UAv (ORCPT ); Fri, 29 May 2020 16:00:51 -0400 Received: from threadripper.lan ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MirfG-1j2QA92mrE-00ev6U; Fri, 29 May 2020 22:00:41 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Sakari Ailus , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Arnd Bergmann Subject: [PATCH 6/9] staging: media: atomisp: fix type mismatch Date: Fri, 29 May 2020 22:00:28 +0200 Message-Id: <20200529200031.4117841-6-arnd@arndb.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200529200031.4117841-1-arnd@arndb.de> References: <20200529200031.4117841-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:9ERfkDS39QaOEAH/LNtEg5SZtZjwNIsVwGEjhU9+K4cojGf/K7V UoWP2n2dxRTtvmH/nsnxAotxP4hMMygcv035tiVShwjEzCZowyjapFC1LoVOT8iA6CmbgF5 E7amGwkRPMGWe5ol9GUJdYDg3PV8fvBrPq5BepHLEg/k344kt+HTTEzVppIY3v5/Bj+7QS2 hL4QtaQY8ORyH/lbNqluA== X-UI-Out-Filterresults: notjunk:1; V03:K0:mnqBXKoOQtc=:6yvsMKsJ87sOKVL5KlMlyJ NM2zqmK1kVt+2jS4Gxf2DCxE1uHIwNMzEPOHZg8bfw9A8ElN7XJcj86IsKOGrnQspJe8esBBH 1cAgJHipTa/c7+4aiDTe+jcZcyyzfOphFY+Be+cvvQkrlH3EhrMQPLiYssdAiYZ2rLiOzmVSY 91wiIHYMO4N7PU1lYruPhuPnWi1E69HKFl/JjupKRaHbvyi0McmAqGs+VCH1rQLdv6uoqtT2e 3fI3g2RXvBG1vz+YLkhDXZjbD5bCOiDU2dZ95yZZ33OWp1YgwfiISrjZX7ZA3qjY5VhSH1QU/ GvDjuy3whxLmZqnGsgM1V1Z1PSoh46MODSvxLo50SUtT11kjKwfvZTdCEyul9aE9PV+CZ+M0U XGcGNZPPMU61pb8jJw3j/eJqGO2F88Wm/tE61n7czJwtw/eVRAz1wG6AH/9ZjhkKG9Hwtqbui r234T75MM11XUgJ0/FjK9sZFgy6oDSwYy08gn4lkgtuIZcXWJWDxELf10s1UfuBVu0SPVWasL wEqNypl/Q9DTjOnFAwBb4mmi1Lj0/KS8Hh/uo0y46kYgmlnzzGI2zBg7wn07o3qs83EvSfIf4 8D0MJI5TiiNDHvD478uGCidyA8uFKrbav8CuXjwLzyJqluKFi/hB3NfJKNf5RHIjfvghLWLer kESbA0UPy1TEyHr1RWh9EzPdrAoBnG2AygVyUdxY5fvLmbfQcfXoJwKV8yUMZD9iD8WgwdIAi B5IbAmYdMOcNa9ba/E0Kgq6Muc4Ix/DkOilMsEHsVrtYcK6lh7TY/EuBfsxCI6LLbH7qLWPkx hX96Z7pROvLod0O+rTxUDNiG2oaame/ndg4YyQnpysJlLgStDk= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The caller passes a variable of a different enum type: drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c:1707:64: error: implicit conversion from enumeration type 'const enum ia_css_frame_format' to different enumeration type 'enum atomisp_input_format' [-Werror,-Wenum-conversion] binary_supports_input_format(xcandidate, req_in_info->format)); An earlier patch tried to address this by changing the type of the function argument, but as the caller passes two different arguments, there is still a warning. Assume that the last patch was correct and change the other caller as well. Fixes: 0116b8df1c9e ("media: staging: atomisp: stop duplicating input format types") Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c b/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c index 2a23b7c6aeeb..10d698295daf 100644 --- a/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c +++ b/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c @@ -1704,7 +1704,7 @@ ia_css_binary_find(struct ia_css_binary_descr *descr, ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_binary_find() [%d] continue: !%d\n", __LINE__, - binary_supports_input_format(xcandidate, req_in_info->format)); + binary_supports_input_format(xcandidate, descr->stream_format)); continue; } #endif From patchwork Fri May 29 20:00:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 209685 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=-9.8 required=3.0 tests=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 67E92C433E0 for ; Fri, 29 May 2020 20:01:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B106207BC for ; Fri, 29 May 2020 20:01:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728025AbgE2UAu (ORCPT ); Fri, 29 May 2020 16:00:50 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:35305 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726866AbgE2UAt (ORCPT ); Fri, 29 May 2020 16:00:49 -0400 Received: from threadripper.lan ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1N3sZy-1iwnQf3ybI-00zltS; Fri, 29 May 2020 22:00:42 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Sakari Ailus , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Arnd Bergmann Subject: [PATCH 7/9] staging: media: atomisp: fix enum type mixups Date: Fri, 29 May 2020 22:00:29 +0200 Message-Id: <20200529200031.4117841-7-arnd@arndb.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200529200031.4117841-1-arnd@arndb.de> References: <20200529200031.4117841-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Oi9GZuwYCtVW0YQN+bXyI0AbOsWHne7iHij3kFt4OBTdybYPLLc H1tbAKJGDVUZ/HsQa0IsK0ChzDn9x9fU4h3sHE2M5zUavENXzgppLZMmVaXJw8OgyvWf8JI 6WLxv0LO1XndxyGT2+tNMSzcBc5pudM+yARQsUzCWMNXsbqpLy5LFNUd51iYNWH5M1XMuyd x4l1SpV6NWqnyboGlSK2w== X-UI-Out-Filterresults: notjunk:1; V03:K0:Iey8Rc3idrk=:R17CteIWPzHogAGPk1oHj2 Ef9fDUzN7RcPNaW6sLJmU2Xs+zMyOjV0Yi2Rm6e9hOJsxxSwz6p3nF0I1uqsJphWUNwjZ5VFq cGBRzn9WDHR4MSsXIyVXGbPM5VHX7gRM8FeUxu81KrIwXXEuiD5JHweTfRLdlm/a+8XO1f9pX IHrvVNBArScrA2uLz6vrjnJzdPI6bM1eACaJnn/LjxuRiinFSalnndz0ed39CLMJX5iKHlzsd dGA2cupAXce2lpCk7UQB5r2RJtVprgpO3JYpUGppuuHLwr0ClY2F+UH+mS5zdub7M+MEJhBU4 ubSfRC+2iR2pXRFD4DxvMp+mVZrUH3X8+3YluC4oCC7orAFJZmArPNOIa5wjhufII/+BHgR/7 gKW4RUhD1AquC5HQ4QQWq+uGyqDyjCG6G809Z7LmGYrzuaYmw/cKs5RZQnc4nkl8RO6IoTA1p dlzfyWYWzYYKBsrRyZZ/3Oq7Xkxj0brEtxLfpZmM6m4rhKx24bRkKrt0iAf9uNfMPnoyG8jSQ pcE8IBgbsu//iK333FfoLHYzqsRVpBqems8d90rwo1wRUKHk6Dziw2EZ3cm6K26OZcWQCDZ8T 8C3c5a9jV7LDkWUSFBfAHenQKFl0tnPbPcDtNqYxhYYthptPMcnNxRxscHftceodQhl3bC6L9 HcnxTel/SZ+jZs4Qt2XdlV9gZrGUJtMXXeEtYRMQ1h9p73p4/+a4XSlSh4alXgbnHDzbJ3yjb w67r9wWYFhXQYPwO9+nn3zEMuMnGYyNjYqMaJrzi93icSQhIYIRAjQb0VutuIsPYC8OUwACDc nAIbKVkBQ8scTOAeuXWvnyk94XHy1BVHXzrodpMYzYwVNvLrKk= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Some function calls pass an incorrect enum type: drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:858:16: error: implicit conversion from enumeration type 'input_system_ID_t' to different enumeration type 'gp_device_ID_t' [-Werror,-Wenum-conversion] gp_device_rst(INPUT_SYSTEM0_ID); ~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~ drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:860:19: error: implicit conversion from enumeration type 'input_system_ID_t' to different enumeration type 'gp_device_ID_t' [-Werror,-Wenum-conversion] input_switch_rst(INPUT_SYSTEM0_ID); ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~ drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:876:27: error: implicit conversion from enumeration type 'input_system_cfg_flag_t' to different enumeration type 'input_system_connection_t' [-Werror,-Wenum-conversion] config.multicast[i] = INPUT_SYSTEM_CFG_FLAG_RESET; ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1326:32: error: implicit conversion from enumeration type 'input_system_ID_t' to different enumeration type 'gp_device_ID_t' [-Werror,-Wenum-conversion] input_selector_cfg_for_sensor(INPUT_SYSTEM0_ID); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~ drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1329:19: error: implicit conversion from enumeration type 'input_system_ID_t' to different enumeration type 'gp_device_ID_t' [-Werror,-Wenum-conversion] input_switch_cfg(INPUT_SYSTEM0_ID, &config.input_switch_cfg); ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~ INPUT_SYSTEM0_ID is zero, so use the corresponding zero-value of the expected types instead. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann --- .../pci/hive_isp_css_common/host/input_system.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c index 2114cf4f3fda..aa0f0fca9346 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c @@ -855,9 +855,9 @@ input_system_error_t input_system_configuration_reset(void) input_system_network_rst(INPUT_SYSTEM0_ID); - gp_device_rst(INPUT_SYSTEM0_ID); + gp_device_rst(GP_DEVICE0_ID); - input_switch_rst(INPUT_SYSTEM0_ID); + input_switch_rst(GP_DEVICE0_ID); //target_rst(); @@ -873,7 +873,7 @@ input_system_error_t input_system_configuration_reset(void) for (i = 0; i < N_CSI_PORTS; i++) { config.csi_buffer_flags[i] = INPUT_SYSTEM_CFG_FLAG_RESET; - config.multicast[i] = INPUT_SYSTEM_CFG_FLAG_RESET; + config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL; } config.source_type_flags = INPUT_SYSTEM_CFG_FLAG_RESET; @@ -1323,10 +1323,10 @@ static input_system_error_t configuration_to_registers(void) } // end of switch (source_type) // Set input selector. - input_selector_cfg_for_sensor(INPUT_SYSTEM0_ID); + input_selector_cfg_for_sensor(GP_DEVICE0_ID); // Set input switch. - input_switch_cfg(INPUT_SYSTEM0_ID, &config.input_switch_cfg); + input_switch_cfg(GP_DEVICE0_ID, &config.input_switch_cfg); // Set input formatters. // AM: IF are set dynamically.