From patchwork Sun May 14 09:33:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Debroux X-Patchwork-Id: 9725621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 99D8160384 for ; Sun, 14 May 2017 09:51:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9296928920 for ; Sun, 14 May 2017 09:51:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86DCF28925; Sun, 14 May 2017 09:51:01 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 6A84D28920 for ; Sun, 14 May 2017 09:51:00 +0000 (UTC) Received: (qmail 32267 invoked by uid 550); 14 May 2017 09:50:52 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 32217 invoked from network); 14 May 2017 09:50:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.fr; s=s2048; t=1494755438; bh=/b//GUzV5SNnhtGs4q2OC+gJCjljdUz0lZtGStnl844=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject; b=Wv1fm/MYOcTTDKdVg8Inv5MW4DGDg1HR3ec3n8nMwMAhFgQki+3EDVqZ58+9Yp4rnbCYEpCfNpI7KYVB3zutlgP+V8T9cQCRqNJXY3pYkTlSt0XhwAOceHsjjLzIJbtuQOAcndGYSpMFkLDNX0CC5gqPV5UdYD86UV8OVUzcBa0mTUhHEF0PMQxC/uYxyEKTo27o4ccBBtpHnk4yf7MLtXPp+3EuoSAr/KJArSaDiuWDn18N1GgDLfuDs6uARCliPaX4j71e3K1VKxHdfYXSDa3omOD1uqJ2NB4pL6mHxh257RXYSKWDwJZnx7QkDdimEWm1dKwT4NzL+4yi3PZbaQ== X-Yahoo-Newman-Id: 556966.17505.bm@smtp135.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: V9DQuLQVM1n6sPBDChgCfvwbWq.FfQz6x5uljh25ddDl0xk PHyBD5qOunK3XsBDtys6q8J9cW0yvjAVpy38HtqH5xymyeoZ_ZsKLf4ld.kM sxGtZcJNdZi.YYU2y.B4h.0vlBJX.kY5vDoh_GOuHmPDCyQ2Rv3OHCC6IfYy Xe0fu.ituYzse8oN8Yoamd2dPib_vw.KJ6Na7a8doyuBVeJ8.NKuajHvudeI 7um7JpBkg9ocRo3_IbyPzSRboipNW2aTexDuGDyBU4dC.O1FheP9MCgM5KS6 9nYbuFVhDuzlHpNsvFurXuh86I751YKd3WMZYLMJpOJMqjNwTTwV_tx.2u7v 4RS8Sz62rgG_u_nsWAW73DVpJyqeQnVok8YdVqT3apADR6_JWy3mnOBXMAVO 0.s8bekvUFwVta7RS6aWZeoLLbmv6icKZCoks5C0qcRGbuRIeHfGCxQd9LYV CCV11.VoZFVvmoYQ7LcdRlXBky29I..zxGRqeklwuLUPR3eyLn_PKPvKa_52 wVTZG5oCJlDooym5qgyPUQKBGiOqv7xaBMDDYCMvdLZYzSF.euiGJ7tTPZQc YHfzGlSxDQ4HUxuP11g-- X-Yahoo-SMTP: zgdcvJ6swBBcTOk5fgveL37ak9AQxYCP7GdO From: Lionel Debroux To: kernel-hardening@lists.openwall.com Cc: Lionel Debroux Date: Sun, 14 May 2017 11:33:27 +0200 Message-Id: <1494754407-31455-2-git-send-email-lionel_debroux@yahoo.fr> X-Mailer: git-send-email 2.8.1.217.ge6ac6e1 In-Reply-To: <1494754407-31455-1-git-send-email-lionel_debroux@yahoo.fr> References: <1494754407-31455-1-git-send-email-lionel_debroux@yahoo.fr> Subject: [kernel-hardening] [PATCH] drivers/media: improve the return type of a bunch of .get_frontend_algo callbacks. X-Virus-Scanned: ClamAV using ClamSMTP The definition of struct dvb_frontend_ops has .get_frontend_algo return enum dvbfe_algo, so use that instead of the less descriptive "int". Extracted from PaX/grsecurity. Signed-off-by: Lionel Debroux --- drivers/media/dvb-frontends/cx24116.c | 2 +- drivers/media/dvb-frontends/cx24117.c | 2 +- drivers/media/dvb-frontends/cx24120.c | 2 +- drivers/media/dvb-frontends/cx24123.c | 2 +- drivers/media/dvb-frontends/cxd2820r_core.c | 2 +- drivers/media/dvb-frontends/mb86a20s.c | 2 +- drivers/media/dvb-frontends/s921.c | 2 +- drivers/media/pci/bt8xx/dst.c | 2 +- drivers/media/pci/pt1/va1j5jf8007s.c | 2 +- drivers/media/pci/pt1/va1j5jf8007t.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/media/dvb-frontends/cx24116.c b/drivers/media/dvb-frontends/cx24116.c index e105532..e07d52bb 100644 --- a/drivers/media/dvb-frontends/cx24116.c +++ b/drivers/media/dvb-frontends/cx24116.c @@ -1462,7 +1462,7 @@ static int cx24116_tune(struct dvb_frontend *fe, bool re_tune, return cx24116_read_status(fe, status); } -static int cx24116_get_algo(struct dvb_frontend *fe) +static enum dvbfe_algo cx24116_get_algo(struct dvb_frontend *fe) { return DVBFE_ALGO_HW; } diff --git a/drivers/media/dvb-frontends/cx24117.c b/drivers/media/dvb-frontends/cx24117.c index d37cb77..97e0fef 100644 --- a/drivers/media/dvb-frontends/cx24117.c +++ b/drivers/media/dvb-frontends/cx24117.c @@ -1555,7 +1555,7 @@ static int cx24117_tune(struct dvb_frontend *fe, bool re_tune, return cx24117_read_status(fe, status); } -static int cx24117_get_algo(struct dvb_frontend *fe) +static enum dvbfe_algo cx24117_get_algo(struct dvb_frontend *fe) { return DVBFE_ALGO_HW; } diff --git a/drivers/media/dvb-frontends/cx24120.c b/drivers/media/dvb-frontends/cx24120.c index 7f11dcc..01da670 100644 --- a/drivers/media/dvb-frontends/cx24120.c +++ b/drivers/media/dvb-frontends/cx24120.c @@ -1491,7 +1491,7 @@ static int cx24120_tune(struct dvb_frontend *fe, bool re_tune, return cx24120_read_status(fe, status); } -static int cx24120_get_algo(struct dvb_frontend *fe) +static enum dvbfe_algo cx24120_get_algo(struct dvb_frontend *fe) { return DVBFE_ALGO_HW; } diff --git a/drivers/media/dvb-frontends/cx24123.c b/drivers/media/dvb-frontends/cx24123.c index 4ae3d92..1292c05 100644 --- a/drivers/media/dvb-frontends/cx24123.c +++ b/drivers/media/dvb-frontends/cx24123.c @@ -1005,7 +1005,7 @@ static int cx24123_tune(struct dvb_frontend *fe, return retval; } -static int cx24123_get_algo(struct dvb_frontend *fe) +static enum dvbfe_algo cx24123_get_algo(struct dvb_frontend *fe) { return DVBFE_ALGO_HW; } diff --git a/drivers/media/dvb-frontends/cxd2820r_core.c b/drivers/media/dvb-frontends/cxd2820r_core.c index f6ebbb4..3e0d8cb 100644 --- a/drivers/media/dvb-frontends/cxd2820r_core.c +++ b/drivers/media/dvb-frontends/cxd2820r_core.c @@ -403,7 +403,7 @@ static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe) return DVBFE_ALGO_SEARCH_ERROR; } -static int cxd2820r_get_frontend_algo(struct dvb_frontend *fe) +static enum dvbfe_algo cxd2820r_get_frontend_algo(struct dvb_frontend *fe) { return DVBFE_ALGO_CUSTOM; } diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c index e8ac8c3..e0f4ba8 100644 --- a/drivers/media/dvb-frontends/mb86a20s.c +++ b/drivers/media/dvb-frontends/mb86a20s.c @@ -2055,7 +2055,7 @@ static void mb86a20s_release(struct dvb_frontend *fe) kfree(state); } -static int mb86a20s_get_frontend_algo(struct dvb_frontend *fe) +static enum dvbfe_algo mb86a20s_get_frontend_algo(struct dvb_frontend *fe) { return DVBFE_ALGO_HW; } diff --git a/drivers/media/dvb-frontends/s921.c b/drivers/media/dvb-frontends/s921.c index 274544a..9ef9b9b 100644 --- a/drivers/media/dvb-frontends/s921.c +++ b/drivers/media/dvb-frontends/s921.c @@ -464,7 +464,7 @@ static int s921_tune(struct dvb_frontend *fe, return rc; } -static int s921_get_algo(struct dvb_frontend *fe) +static enum dvbfe_algo s921_get_algo(struct dvb_frontend *fe) { return DVBFE_ALGO_HW; } diff --git a/drivers/media/pci/bt8xx/dst.c b/drivers/media/pci/bt8xx/dst.c index 7166d22..fa682f9 100644 --- a/drivers/media/pci/bt8xx/dst.c +++ b/drivers/media/pci/bt8xx/dst.c @@ -1657,7 +1657,7 @@ static int dst_tune_frontend(struct dvb_frontend* fe, return 0; } -static int dst_get_tuning_algo(struct dvb_frontend *fe) +static enum dvbfe_algo dst_get_tuning_algo(struct dvb_frontend *fe) { return dst_algo ? DVBFE_ALGO_HW : DVBFE_ALGO_SW; } diff --git a/drivers/media/pci/pt1/va1j5jf8007s.c b/drivers/media/pci/pt1/va1j5jf8007s.c index f75f695..d913a60 100644 --- a/drivers/media/pci/pt1/va1j5jf8007s.c +++ b/drivers/media/pci/pt1/va1j5jf8007s.c @@ -98,7 +98,7 @@ static int va1j5jf8007s_read_snr(struct dvb_frontend *fe, u16 *snr) return 0; } -static int va1j5jf8007s_get_frontend_algo(struct dvb_frontend *fe) +static enum dvbfe_algo va1j5jf8007s_get_frontend_algo(struct dvb_frontend *fe) { return DVBFE_ALGO_HW; } diff --git a/drivers/media/pci/pt1/va1j5jf8007t.c b/drivers/media/pci/pt1/va1j5jf8007t.c index 63fda79..4115c3c 100644 --- a/drivers/media/pci/pt1/va1j5jf8007t.c +++ b/drivers/media/pci/pt1/va1j5jf8007t.c @@ -88,7 +88,7 @@ static int va1j5jf8007t_read_snr(struct dvb_frontend *fe, u16 *snr) return 0; } -static int va1j5jf8007t_get_frontend_algo(struct dvb_frontend *fe) +static enum dvbfe_algo va1j5jf8007t_get_frontend_algo(struct dvb_frontend *fe) { return DVBFE_ALGO_HW; }