From patchwork Thu Jun 27 21:09:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11020661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 775B576 for ; Thu, 27 Jun 2019 21:10:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F2FC28735 for ; Thu, 27 Jun 2019 21:10:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62F922873E; Thu, 27 Jun 2019 21:10:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DA6728735 for ; Thu, 27 Jun 2019 21:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726540AbfF0VKL (ORCPT ); Thu, 27 Jun 2019 17:10:11 -0400 Received: from mout.gmx.net ([212.227.15.15]:45505 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbfF0VKL (ORCPT ); Thu, 27 Jun 2019 17:10:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1561669792; bh=ttpEs1jpLEZYuVPaNhB5NUXKeu5GWnJTmxgKtFVsZ/E=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=gMEVQ0kdpgS4z/iWG9q+I1R0jN91fex3/I9NMhsIyLNA4DvAPg18uQHUmWA6lGMOU s1MuiUBiTtUHUm0epHAeNhyjQYbIoexjIsPugFdUieD3eF3YEO4RASFj191wx24Emx yH9hcc2lChBPMTOASr1FlgTOwrrczltPTsc9S+IA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.111]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MzyuS-1iSeG93GZq-00x4FN; Thu, 27 Jun 2019 23:09:51 +0200 From: Stefan Wahren To: Eric Anholt , Greg Kroah-Hartman , Dave Stevenson , Hans Verkuil , Mauro Carvalho Chehab Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-media@vger.kernel.org Subject: [PATCH 31/31] staging: bcm2835-camera: Correct ctrl min/max/step/def to 64bit Date: Thu, 27 Jun 2019 23:09:29 +0200 Message-Id: <1561669769-2498-5-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561669769-2498-1-git-send-email-wahrenst@gmx.net> References: <1561669769-2498-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:r8Us6r3bVX5kevDTW9x6AqdZPb7soLP6SbFXLB/ALq4FGi16Z0q BLCqJ4aT6jj1Sc8pIg5fyywuHv53mbTvxkAV2npWu3TUECFUaIV9TKLny43YDpefXb7be9f X1wG6PmPL6UmMQWGqyOYwEiiphuxZQY1eIkEmvrgoS7pTp2x/aEZ/yZRKY6EsLz+5swW4Z9 aq5gQcacPy3aT1BuWwRzg== X-UI-Out-Filterresults: notjunk:1;V03:K0:thW8iTalx6U=:uzQ9Jy4TB1gBUkNwErgS5W cwJdOoSd4G5duDcnifUJPU2BNYupQQCBlw/PuXukgk+aJBjFtW+4JwbrfX4w24d+NeHt2XcAq at/9WbfLsnsPrI1eI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mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dave Stevenson The V4L2 control API was expanded to take 64 bit values in commit 0ba2aeb6dab (Apr 16 2014), but as this driver wasn't in the mainline kernel at that point this was overlooked. Update to use 64 bit values. This also fixes a couple of warnings in 64 bit builds. Signed-off-by: Dave Stevenson --- drivers/staging/vc04_services/bcm2835-camera/controls.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.7.4 diff --git a/drivers/staging/vc04_services/bcm2835-camera/controls.c b/drivers/staging/vc04_services/bcm2835-camera/controls.c index 848b14a..89786c2 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c @@ -78,10 +78,10 @@ struct bm2835_mmal_v4l2_ctrl { /* control minimum value or * mask for MMAL_CONTROL_TYPE_STD_MENU */ - s32 min; - s32 max; /* maximum value of control */ - s32 def; /* default value of control */ - s32 step; /* step size of the control */ + s64 min; + s64 max; /* maximum value of control */ + s64 def; /* default value of control */ + u64 step; /* step size of the control */ const s64 *imenu; /* integer menu array */ u32 mmal_id; /* mmal parameter id */ bm2835_mmal_v4l2_ctrl_cb *setter; @@ -1250,7 +1250,7 @@ int bm2835_mmal_init_controls(struct bm2835_mmal_dev *dev, case MMAL_CONTROL_TYPE_STD_MENU: { - int mask = ctrl->min; + u64 mask = ctrl->min; if (ctrl->id == V4L2_CID_SCENE_MODE) { /* Special handling to work out the mask @@ -1260,11 +1260,11 @@ int bm2835_mmal_init_controls(struct bm2835_mmal_dev *dev, */ int i; - mask = 1 << V4L2_SCENE_MODE_NONE; + mask = BIT(V4L2_SCENE_MODE_NONE); for (i = 0; i < ARRAY_SIZE(scene_configs); i++) { - mask |= 1 << scene_configs[i].v4l2_scene; + mask |= BIT(scene_configs[i].v4l2_scene); } mask = ~mask; }