Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753387AbdLNPUd (ORCPT ); Thu, 14 Dec 2017 10:20:33 -0500 Received: from mail.CARNet.hr ([161.53.123.6]:34722 "EHLO mail.carnet.hr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753182AbdLNPUa (ORCPT ); Thu, 14 Dec 2017 10:20:30 -0500 From: Valentin Vidic To: Dan Carpenter Cc: Marcus Wolf , devel@driverdev.osuosl.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Marcin Ciupak , Marcus Wolf , =?UTF-8?q?Simon=20Sandstr=C3=B6m?= , Valentin Vidic Date: Thu, 14 Dec 2017 16:20:20 +0100 Message-Id: <20171214152020.15859-1-Valentin.Vidic@CARNet.hr> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171214144215.zj35buhshkayopuj@mwanda> References: <20171213142156.3201-1-Valentin.Vidic@CARNet.hr> <20171213142156.3201-6-Valentin.Vidic@CARNet.hr> <70c9a1fc-31eb-27c4-1283-35590f8b80f6@smarthome-wolf.de> <20171213165514.12509-1-Valentin.Vidic@CARNet.hr> <38352026-045b-a082-93bb-10e9e70f9f55@smarthome-wolf.de> <20171213174444.21088-1-Valentin.Vidic@CARNet.hr> <20171214144215.zj35buhshkayopuj@mwanda> X-SA-Exim-Connect-IP: 2001:b68:ff:12::131 Subject: [PATCH 6/8 v4] staging: pi433: remove unused function X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2347 Lines: 59 As it turns out rf69_get_lna_gain is not used at all. Signed-off-by: Valentin Vidic --- v2: - drop change for SHIFT_DATAMODUL_MODULATION_TYPE - move shifting to the header file v3: - drop auto case - use CURRENT suffix - precompute define values v4: - drop the whole function since it is not called from anywhere drivers/staging/pi433/rf69.c | 18 ------------------ drivers/staging/pi433/rf69.h | 1 - 2 files changed, 19 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index f77ecd60f43a..2aae23a813a0 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -334,24 +334,6 @@ int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain) } } -enum lnaGain rf69_get_lna_gain(struct spi_device *spi) -{ - u8 currentValue; - - currentValue = rf69_read_reg(spi, REG_LNA); - - switch (currentValue & MASK_LNA_CURRENT_GAIN >> 3) { // improvement: change 3 to define - case LNA_GAIN_AUTO: return automatic; - case LNA_GAIN_MAX: return max; - case LNA_GAIN_MAX_MINUS_6: return maxMinus6; - case LNA_GAIN_MAX_MINUS_12: return maxMinus12; - case LNA_GAIN_MAX_MINUS_24: return maxMinus24; - case LNA_GAIN_MAX_MINUS_36: return maxMinus36; - case LNA_GAIN_MAX_MINUS_48: return maxMinus48; - default: return undefined; - } -} - int rf69_set_dc_cut_off_frequency_intern(struct spi_device *spi, u8 reg, enum dccPercent dccPercent) { switch (dccPercent) { diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h index e8803241b13b..e8640b0ee33b 100644 --- a/drivers/staging/pi433/rf69.h +++ b/drivers/staging/pi433/rf69.h @@ -39,7 +39,6 @@ int rf69_set_output_power_level(struct spi_device *spi, u8 powerLevel); int rf69_set_pa_ramp(struct spi_device *spi, enum paRamp paRamp); int rf69_set_antenna_impedance(struct spi_device *spi, enum antennaImpedance antennaImpedance); int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain); -enum lnaGain rf69_get_lna_gain(struct spi_device *spi); int rf69_set_dc_cut_off_frequency_intern(struct spi_device *spi, u8 reg, enum dccPercent dccPercent); int rf69_set_dc_cut_off_frequency(struct spi_device *spi, enum dccPercent dccPercent); int rf69_set_dc_cut_off_frequency_during_afc(struct spi_device *spi, enum dccPercent dccPercent); -- 2.15.0