From patchwork Fri Dec 18 15:14:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7886441 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B89049F32E for ; Fri, 18 Dec 2015 15:14:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E25D420268 for ; Fri, 18 Dec 2015 15:14:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D5AE20328 for ; Fri, 18 Dec 2015 15:14:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932360AbbLRPO0 (ORCPT ); Fri, 18 Dec 2015 10:14:26 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:51492 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752957AbbLRPOY (ORCPT ); Fri, 18 Dec 2015 10:14:24 -0500 Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0MH3Li-1ZxHIP3AXa-00DsOb; Fri, 18 Dec 2015 16:14:11 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] [media] dvbdev: avoid unused functions Date: Fri, 18 Dec 2015 16:14:06 +0100 Message-ID: <1622537.sJciORk4kT@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:5TFQoSmZmlHb+cg00/IMn0WVjqev9zaPDfnu7IlbTeLSCuSd3l/ Vwqfx6UN24e7v/JDeDXkwqfFDjYRJIaA5vCw04l0shsE4KrS/07scwjbmEEJhZ5WFTpWZ2o NsLRH8rJxh90iMQeNLy8y9RPVfkf7l2LGbzfbYChzttR2hGon5PC+M5yY1kFadE4d3Ets67 a+TaW+REE8r1VUdFAjv3w== X-UI-Out-Filterresults: notjunk:1; V01:K0:5Dr1tTyYnvg=:3Hk9gzjOKZ/ExrwpjUNCCG NZ+G4rsip9vqsexdfX/2XzI49pFHiG2UgI2Ssj9rtJY9YA3cLEPJ/zNAFVgMIlV+o0m+HPGAb HpgQu7jkeK0etp4qRK8FF0/mQpslmPXeQUvpMVhMzMwszCiFRCeEvsuLBgHyHGwFRmwvRV58p jVLNVN0aBdcNoOV/1ALWIxdRCiXCm3uSRw5Kg7GIu/NJEkjVhkviNw5A6/OEAmrnNjb3lLsJ5 iQ70kmv/J00tEvY/SGnhxVHxMfki0oOxaf7YQd9RpTCF+claXmVs8fFe0cQlAea6n9t4iw70V VYC5mQs6Uh290AtyJIQ0Ct0Ii/tVy+tTLXmZFQt0+I5qjxcn/z6RwsMBXJBUVQ3VD3nJfb9c2 3SvcgEUdYoHeYqjJXdHFRHpz+5u+hFaIctfVNkDEYXW31p8jUGxisCSG3VdwzMc7aTKJcbFZR sqZbd1uWlpWAkOXKDm+1q9XOJWMv3Jp8h0khQvpZuD9zvqfc0ckVRHsb+vEzLN2qgZHh5w55N GZgNzDaRLUJX/AyyBasg57nso2NA7s0MI2nhQOaelsJM/JpVMS4klspqIt0wiKP/2f6oUixAl qKGwZyU06s222EqlzgXAe0/85WQpNeJ0EIWopjvEuRGtaV45f8e5TODJcJ/7xurPTl4CB4MWU lqUGH1cdmQmFnggPC6M4eJWMd7Hq5+5pphuGv8Zqc/gVmiMUF+YNAPxqHPq99m+ZR/o4Dk+TU goppDIHtvz+jEZK7 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 dvb_create_tsout_entity and dvb_create_media_entity functions are only called if CONFIG_MEDIA_CONTROLLER_DVB is enabled, otherwise we get a compiler warning: dvb-core/dvbdev.c:219:12: warning: 'dvb_create_tsout_entity' defined but not used [-Wunused-function] dvb-core/dvbdev.c:264:12: warning: 'dvb_create_media_entity' defined but not used [-Wunused-function] This moves the #ifdef inside of the two functions to the outside, to avoid the two warnings. Signed-off-by: Arnd Bergmann --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index b56e00817d3f..860dd7d06b60 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c @@ -216,10 +216,10 @@ static void dvb_media_device_free(struct dvb_device *dvbdev) #endif } +#if defined(CONFIG_MEDIA_CONTROLLER_DVB) static int dvb_create_tsout_entity(struct dvb_device *dvbdev, const char *name, int npads) { -#if defined(CONFIG_MEDIA_CONTROLLER_DVB) int i, ret = 0; dvbdev->tsout_pads = kcalloc(npads, sizeof(*dvbdev->tsout_pads), @@ -254,7 +254,6 @@ static int dvb_create_tsout_entity(struct dvb_device *dvbdev, if (ret < 0) return ret; } -#endif return 0; } @@ -264,7 +263,6 @@ static int dvb_create_tsout_entity(struct dvb_device *dvbdev, static int dvb_create_media_entity(struct dvb_device *dvbdev, int type, int demux_sink_pads) { -#if defined(CONFIG_MEDIA_CONTROLLER_DVB) int i, ret, npads; switch (type) { @@ -352,9 +350,9 @@ static int dvb_create_media_entity(struct dvb_device *dvbdev, printk(KERN_DEBUG "%s: media entity '%s' registered.\n", __func__, dvbdev->entity->name); -#endif return 0; } +#endif static int dvb_register_media_device(struct dvb_device *dvbdev, int type, int minor,