From patchwork Fri Aug 30 11:11:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2851897 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6E0549F313 for ; Fri, 30 Aug 2013 11:29:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D93F20360 for ; Fri, 30 Aug 2013 11:29:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C716F20335 for ; Fri, 30 Aug 2013 11:29:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755606Ab3H3L3D (ORCPT ); Fri, 30 Aug 2013 07:29:03 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:63748 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755601Ab3H3L3A (ORCPT ); Fri, 30 Aug 2013 07:29:00 -0400 Received: by mail-pa0-f49.google.com with SMTP id ld10so2203003pab.36 for ; Fri, 30 Aug 2013 04:28:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Pq8zQx7/rs76sTs8HvBjG3YNm+id2GUl10ILdbRza0A=; b=KaH31GlshHKV3EdSpDLrmhNOVGzu1GjAB7ONiqRuMfQY47/L9Wj6CByo7EBFgW0QUJ E0szYCXqzVMeGeQvH5a9iVlCl3sJmrK/tV9aG+mfbGCsZLU6WEbjew6d8lqIMySVUGsR WdXz7ymnmIskhCrL4BCDpAtFvXD6izMIuJvDrCP/7wCO0nmSW+mRWEC0w9MxP8HxO7HC JgganyvRbpsNG9H/r6AKbAalyP3/40O65nxJHMFpONg+755CoaID4kNcuPln8sMfxD9T 1cxQDbwV6R8Iics1DKDuL7wGhyF4QxiUKezjV4DHH0Ooha3eIMTA9c3zpdHB0Ejiuf1B C0Hg== X-Gm-Message-State: ALoCoQkDXRYpL4cM6X5gdEo6kFix0OTAwGgV5mppwC+Rd5GSLC8LwdXPguiecVoPUNydLKw+FRsW X-Received: by 10.66.248.161 with SMTP id yn1mr10389855pac.0.1377862139882; Fri, 30 Aug 2013 04:28:59 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id ef10sm47270638pac.1.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Aug 2013 04:28:59 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: hans.verkuil@cisco.com, sachin.kamat@linaro.org, patches@linaro.org, Sylwester Nawrocki Subject: [PATCH 1/1] [media] v4l2-ctrls: Remove duplicate const Date: Fri, 30 Aug 2013 16:41:22 +0530 Message-Id: <1377861082-17312-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function returns a pointer to a const array. Duplicate use of const led to the following warning. drivers/media/v4l2-core/v4l2-ctrls.c:574:32: warning: duplicate const Signed-off-by: Sachin Kamat Cc: Sylwester Nawrocki --- drivers/media/v4l2-core/v4l2-ctrls.c | 6 +++--- include/media/v4l2-common.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index c6dc1fd..653d48d 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -565,13 +565,13 @@ EXPORT_SYMBOL(v4l2_ctrl_get_menu); * Returns NULL or an s64 type array containing the menu for given * control ID. The total number of the menu items is returned in @len. */ -const s64 const *v4l2_ctrl_get_int_menu(u32 id, u32 *len) +const s64 *v4l2_ctrl_get_int_menu(u32 id, u32 *len) { - static const s64 const qmenu_int_vpx_num_partitions[] = { + static const s64 qmenu_int_vpx_num_partitions[] = { 1, 2, 4, 8, }; - static const s64 const qmenu_int_vpx_num_ref_frames[] = { + static const s64 qmenu_int_vpx_num_ref_frames[] = { 1, 2, 3, }; diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 16550c4..b87692c 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h @@ -86,7 +86,7 @@ int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, const char * const *menu_items); const char *v4l2_ctrl_get_name(u32 id); const char * const *v4l2_ctrl_get_menu(u32 id); -const s64 const *v4l2_ctrl_get_int_menu(u32 id, u32 *len); +const s64 *v4l2_ctrl_get_int_menu(u32 id, u32 *len); int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 step, s32 def); int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu, struct v4l2_queryctrl *qctrl, const char * const *menu_items);