From e9350f073e52a5ca03acc75619ffa1e01f871246 Mon Sep 17 00:00:00 2001 From: Ramasamy Chandramouli Date: Fri, 8 Sep 2023 15:59:48 -0700 Subject: [PATCH] [PR:16737, PR:16739] platform-modules: pddf, broadcom/cel: adapt for kernel 6.1 and bookworm (#16954) * sonic-platform-modules-cel: broadcom: adapt for kernel 6.1 and bookworm The i2c_driver->remove API declaration has been updated to return void instead of int, as part of cleanup patches in 6.1. More details can be referred from here: [1]. Update the remove API definition in the modules accordingly and cleanup variables that go unused from the remove API. Update python build commands for bookworm. The packaging based on calling setup.py is deprecated and using build module/pip utility is the recommended method for python packaging/installation. Further details can be referred to from here: [2], [3]. The build module is picky about the package information file, which needs to be either setup.py or pyproject.toml. Additionally, fix formatting inconsistencies in debian/changelog reported by `dh_installchangelogs` during the build. Tested the changes by compiling the changes as below: make sonic-slave-bash NOBUSTER=1 NOBULLSEYE=1 sudo dpkg -i target/debs/bookworm/linux-headers-6.1.0-11-2-*.deb cd platform/broadcom/sonic-platform-modules-cel KVERSION=6.1.0-11-2-amd64 dpkg-buildpackage Also verified the python scripts under the sonic-platform-modules-cel with pyflakes to ensure no new errors are flagged (with exception of unused modules). References: [1] - https://github.com/torvalds/linux/commit/ed5c2f5f [2] - https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.htm [3] - 0b20a4863 (Update Python build commands for Bookworm, 2023-09-07) Signed-off-by: Ramasamy Chandramouli * platform/pddf: i2c: adapt for kernel 6.1 and bookworm * Fixup i2c_driver->remove API due to changes in the function prototype (ref: [1]). * Cleanup `MODULE_SUPPORTED_DEVICE` macros that were cleaned up in the upstream (ref: [2]). * Sanitize python packaging and installation using the `build` module instead of calling the setup.py directly (ref: [3]. [4]). Tested the changes by compiling pddf module as below: make sonic-slave-bash NOBUSTER=1 NOBULLSEYE=1 sudo dpkg -i target/debs/bookworm/linux-headers-6.1.0-11-2-*.deb cd platform/pddf/i2c KVERSION=6.1.0-11-2-amd64 dpkg-buildpackage References: [1] - https://github.com/torvalds/linux/commit/ed5c2f5f [2] - https://github.com/torvalds/linux/commit/6417f031 [2] - https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.htm [3] - 0b20a4863 (Update Python build commands for Bookworm, 2023-09-07) Signed-off-by: Ramasamy Chandramouli * platform/broadcom: include platform-modules-cel in builds With pddf modules patched for 6.1, platform-modules-cel can be compiled and included in the final image. Testing by building sonic-broadcom.bin/sonic-broadcom-dnx.bin. Signed-off-by: Ramasamy Chandramouli * pddf/i2c: revert correct rootdir for pip install The pip install directory has been set to test-pkg1/ for testing the build and incorrectly retained as is. Revert this to the correct path $(PACKAGE_PRE_NAME). Signed-off-by: Ramasamy Chandramouli * platform/broadcom: include pddf/modules-cel in the base package Without this change, the modules were built but not packaged in the final .bin. The final sonic-broadcom.bin has been tested for bootup on Celestica's Silverstone platform. admin@sonic:~$ uname -a Linux sonic 6.1.0-11-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08) x86_64 GNU/Linux admin@sonic:~$ show platform summary Platform: x86_64-cel_silverstone-r0 HwSKU: Silverstone ASIC: broadcom ASIC Count: 1 Serial Number: R4009B2F062504LK200024 Model Number: N/A Hardware Revision: N/A admin@sonic:~$ show version | head SONiC Software Version: SONiC.g0aad6c67c-rachandr SONiC OS Version: 12 Distribution: Debian 12.2 Kernel: 6.1.0-11-2-amd64 Build commit: 0aad6c67c Build date: Thu Oct 26 07:13:47 UTC 2023 Built by: rachandr@AZUHPS14 Platform: x86_64-cel_silverstone-r0 Signed-off-by: Ramasamy Chandramouli --------- Signed-off-by: Ramasamy Chandramouli --- platform/broadcom/rules.dep | 3 +-- platform/broadcom/rules.mk | 3 +-- .../belgite/modules/mc24lc64t.c | 5 +---- .../pddf/{sonic_platform_setup.py => setup.py} | 0 .../sonic-platform-modules-cel/debian/changelog | 6 +++--- .../broadcom/sonic-platform-modules-cel/debian/rules | 12 +++++------- .../dx010/modules/emc2305.c | 3 +-- .../dx010/modules/mc24lc64t.c | 4 +--- .../haliburton/modules/emc2305.c | 3 +-- .../haliburton/modules/mc24lc64t.c | 4 +--- .../seastone2/modules/mc24lc64t.c | 5 +---- .../silverstone/modules/mc24lc64t.c | 5 +---- platform/pddf/i2c/debian/rules | 5 +++-- .../pddf/i2c/modules/cpld/driver/pddf_cpld_driver.c | 4 +--- .../pddf/i2c/modules/fan/driver/pddf_fan_driver.c | 4 +--- .../i2c/modules/fpgai2c/driver/pddf_fpgai2c_driver.c | 4 +--- .../i2c/modules/fpgapci/driver/pddf_fpgapci_driver.c | 1 - .../pddf/i2c/modules/psu/driver/pddf_psu_driver.c | 4 +--- .../pddf/i2c/modules/xcvr/driver/pddf_xcvr_driver.c | 4 +--- 19 files changed, 25 insertions(+), 54 deletions(-) rename platform/broadcom/sonic-platform-modules-cel/belgite/pddf/{sonic_platform_setup.py => setup.py} (100%) diff --git a/platform/broadcom/rules.dep b/platform/broadcom/rules.dep index 103fed00ef7c..40e69471872b 100644 --- a/platform/broadcom/rules.dep +++ b/platform/broadcom/rules.dep @@ -5,7 +5,6 @@ include $(PLATFORM_PATH)/sai.dep # * Nokia # * Dell # * Accton -# * Celestica # * Juniper # * Ragile include $(PLATFORM_PATH)/platform-modules-s6000.dep @@ -15,7 +14,7 @@ include $(PLATFORM_PATH)/platform-modules-ingrasys.dep #include $(PLATFORM_PATH)/platform-modules-accton.dep include $(PLATFORM_PATH)/platform-modules-alphanetworks.dep include $(PLATFORM_PATH)/platform-modules-inventec.dep -#include $(PLATFORM_PATH)/platform-modules-cel.dep +include $(PLATFORM_PATH)/platform-modules-cel.dep include $(PLATFORM_PATH)/platform-modules-delta.dep include $(PLATFORM_PATH)/platform-modules-quanta.dep #include $(PLATFORM_PATH)/platform-modules-mitac.dep diff --git a/platform/broadcom/rules.mk b/platform/broadcom/rules.mk index 0365c980936d..a877fe27a89c 100755 --- a/platform/broadcom/rules.mk +++ b/platform/broadcom/rules.mk @@ -4,7 +4,6 @@ include $(PLATFORM_PATH)/sai.mk # * Nokia # * Dell # * Accton -# * Celestica # * Juniper # * Ragile # * Ufispace @@ -15,7 +14,7 @@ include $(PLATFORM_PATH)/platform-modules-arista.mk #include $(PLATFORM_PATH)/platform-modules-accton.mk include $(PLATFORM_PATH)/platform-modules-alphanetworks.mk #include $(PLATFORM_PATH)/platform-modules-inventec.mk -#include $(PLATFORM_PATH)/platform-modules-cel.mk +include $(PLATFORM_PATH)/platform-modules-cel.mk #include $(PLATFORM_PATH)/platform-modules-delta.mk include $(PLATFORM_PATH)/platform-modules-quanta.mk ##include $(PLATFORM_PATH)/platform-modules-mitac.mk diff --git a/platform/broadcom/sonic-platform-modules-cel/belgite/modules/mc24lc64t.c b/platform/broadcom/sonic-platform-modules-cel/belgite/modules/mc24lc64t.c index e71e551438eb..e363b21d9e97 100644 --- a/platform/broadcom/sonic-platform-modules-cel/belgite/modules/mc24lc64t.c +++ b/platform/broadcom/sonic-platform-modules-cel/belgite/modules/mc24lc64t.c @@ -142,12 +142,9 @@ static int mc24lc64t_probe(struct i2c_client *client, return err; } -static int mc24lc64t_remove(struct i2c_client *client) +static void mc24lc64t_remove(struct i2c_client *client) { - struct mc24lc64t_data *drvdata = i2c_get_clientdata(client); sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr); - - return 0; } static const struct i2c_device_id mc24lc64t_id[] = { diff --git a/platform/broadcom/sonic-platform-modules-cel/belgite/pddf/sonic_platform_setup.py b/platform/broadcom/sonic-platform-modules-cel/belgite/pddf/setup.py similarity index 100% rename from platform/broadcom/sonic-platform-modules-cel/belgite/pddf/sonic_platform_setup.py rename to platform/broadcom/sonic-platform-modules-cel/belgite/pddf/setup.py diff --git a/platform/broadcom/sonic-platform-modules-cel/debian/changelog b/platform/broadcom/sonic-platform-modules-cel/debian/changelog index 843b028e4301..aa89b4df6329 100644 --- a/platform/broadcom/sonic-platform-modules-cel/debian/changelog +++ b/platform/broadcom/sonic-platform-modules-cel/debian/changelog @@ -22,7 +22,7 @@ sonic-cel-platform-modules (0.6) unstable; urgency=low * Remove unused port-mode switch script. This should be done by hwsku config script. * Add script to turn off QSFP low power mode when boot up. - -- Pradchaya Phucharoen Wed, 26 July 2017 10:43:00 +0700 + -- Pradchaya Phucharoen Wed, 26 Jul 2017 10:43:00 +0700 sonic-cel-platform-modules (0.5) unstable; urgency=low @@ -30,13 +30,13 @@ sonic-cel-platform-modules (0.5) unstable; urgency=low * Fix garbage data when using sfputil to read QSFP-transceiver's eeprom. * Fix incorrect endian in eeprom read word data. - -- Pradchaya Phucharoen Tue, 18 July 2017 11:30:00 +0700 + -- Pradchaya Phucharoen Tue, 18 Jul 2017 11:30:00 +0700 sonic-cel-platform-modules (0.4) unstable; urgency=low * Add support for DX010's fancontrol, automatic run-up and FIX bug lpmod - -- Pariwat Leamsumran Thu, 14 June 2017 16:25:00 +0700 + -- Pariwat Leamsumran Thu, 14 Jun 2017 16:25:00 +0700 sonic-cel-platform-modules (0.3) unstable; urgency=low diff --git a/platform/broadcom/sonic-platform-modules-cel/debian/rules b/platform/broadcom/sonic-platform-modules-cel/debian/rules index 29b2b7913ade..7c81e2496f1d 100755 --- a/platform/broadcom/sonic-platform-modules-cel/debian/rules +++ b/platform/broadcom/sonic-platform-modules-cel/debian/rules @@ -16,22 +16,20 @@ override_dh_auto_build: make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \ if [ $$mod = "seastone2" ]; then \ cd $(MOD_SRC_DIR)/services/platform_api; \ - python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \ + python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \ continue; \ fi; \ if [ $$mod = "belgite" ]; then \ cd $(MOD_SRC_DIR); \ if [ -d $(MOD_SRC_DIR)/$${mod}/pddf ]; then \ - cd $(MOD_SRC_DIR)/$${mod}/pddf; \ - if [ -f sonic_platform_setup.py ]; then \ - python3 sonic_platform_setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/pddf; \ - echo "Finished makig pddf whl package for $$mod"; \ - fi; \ + cd $(MOD_SRC_DIR)/$${mod}/pddf; \ + python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/pddf; \ + echo "Finished making pddf whl package for $$mod"; \ fi; \ continue; \ fi; \ cd $(MOD_SRC_DIR)/$${mod}; \ - python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \ + python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \ done) override_dh_auto_install: diff --git a/platform/broadcom/sonic-platform-modules-cel/dx010/modules/emc2305.c b/platform/broadcom/sonic-platform-modules-cel/dx010/modules/emc2305.c index b7a85c17a332..7522d368f646 100644 --- a/platform/broadcom/sonic-platform-modules-cel/dx010/modules/emc2305.c +++ b/platform/broadcom/sonic-platform-modules-cel/dx010/modules/emc2305.c @@ -618,7 +618,7 @@ static const struct sensor_device_attribute *emc2305_fan_attrs[] = { * driver interface */ -static int emc2305_remove(struct i2c_client *client) +static void emc2305_remove(struct i2c_client *client) { struct emc2305_data *data = i2c_get_clientdata(client); int fan_idx, i; @@ -636,7 +636,6 @@ static int emc2305_remove(struct i2c_client *client) &emc2305_attr_common[i].dev_attr); kfree(data); - return 0; } diff --git a/platform/broadcom/sonic-platform-modules-cel/dx010/modules/mc24lc64t.c b/platform/broadcom/sonic-platform-modules-cel/dx010/modules/mc24lc64t.c index 002172f587e8..421c23890245 100644 --- a/platform/broadcom/sonic-platform-modules-cel/dx010/modules/mc24lc64t.c +++ b/platform/broadcom/sonic-platform-modules-cel/dx010/modules/mc24lc64t.c @@ -108,15 +108,13 @@ static int mc24lc64t_probe(struct i2c_client *client, return err; } -static int mc24lc64t_remove(struct i2c_client *client) +static void mc24lc64t_remove(struct i2c_client *client) { struct mc24lc64t_data *drvdata = i2c_get_clientdata(client); i2c_unregister_device(drvdata->fake_client); sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr); - - return 0; } static const struct i2c_device_id mc24lc64t_id[] = { diff --git a/platform/broadcom/sonic-platform-modules-cel/haliburton/modules/emc2305.c b/platform/broadcom/sonic-platform-modules-cel/haliburton/modules/emc2305.c index c32f5dffbc2d..af217104532f 100644 --- a/platform/broadcom/sonic-platform-modules-cel/haliburton/modules/emc2305.c +++ b/platform/broadcom/sonic-platform-modules-cel/haliburton/modules/emc2305.c @@ -638,7 +638,7 @@ static const struct sensor_device_attribute *emc2305_fan_attrs[] = { * driver interface */ -static int emc2305_remove(struct i2c_client *client) +static void emc2305_remove(struct i2c_client *client) { struct emc2305_data *data = i2c_get_clientdata(client); int fan_idx, i; @@ -656,7 +656,6 @@ static int emc2305_remove(struct i2c_client *client) &emc2305_attr_common[i].dev_attr); kfree(data); - return 0; } diff --git a/platform/broadcom/sonic-platform-modules-cel/haliburton/modules/mc24lc64t.c b/platform/broadcom/sonic-platform-modules-cel/haliburton/modules/mc24lc64t.c index 002172f587e8..421c23890245 100644 --- a/platform/broadcom/sonic-platform-modules-cel/haliburton/modules/mc24lc64t.c +++ b/platform/broadcom/sonic-platform-modules-cel/haliburton/modules/mc24lc64t.c @@ -108,15 +108,13 @@ static int mc24lc64t_probe(struct i2c_client *client, return err; } -static int mc24lc64t_remove(struct i2c_client *client) +static void mc24lc64t_remove(struct i2c_client *client) { struct mc24lc64t_data *drvdata = i2c_get_clientdata(client); i2c_unregister_device(drvdata->fake_client); sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr); - - return 0; } static const struct i2c_device_id mc24lc64t_id[] = { diff --git a/platform/broadcom/sonic-platform-modules-cel/seastone2/modules/mc24lc64t.c b/platform/broadcom/sonic-platform-modules-cel/seastone2/modules/mc24lc64t.c index fc15bb74b68d..5724fe1cfbb7 100644 --- a/platform/broadcom/sonic-platform-modules-cel/seastone2/modules/mc24lc64t.c +++ b/platform/broadcom/sonic-platform-modules-cel/seastone2/modules/mc24lc64t.c @@ -143,12 +143,9 @@ static int mc24lc64t_probe(struct i2c_client *client, return err; } -static int mc24lc64t_remove(struct i2c_client *client) +static void mc24lc64t_remove(struct i2c_client *client) { - struct mc24lc64t_data *drvdata = i2c_get_clientdata(client); sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr); - - return 0; } static const struct i2c_device_id mc24lc64t_id[] = { diff --git a/platform/broadcom/sonic-platform-modules-cel/silverstone/modules/mc24lc64t.c b/platform/broadcom/sonic-platform-modules-cel/silverstone/modules/mc24lc64t.c index fc15bb74b68d..5724fe1cfbb7 100644 --- a/platform/broadcom/sonic-platform-modules-cel/silverstone/modules/mc24lc64t.c +++ b/platform/broadcom/sonic-platform-modules-cel/silverstone/modules/mc24lc64t.c @@ -143,12 +143,9 @@ static int mc24lc64t_probe(struct i2c_client *client, return err; } -static int mc24lc64t_remove(struct i2c_client *client) +static void mc24lc64t_remove(struct i2c_client *client) { - struct mc24lc64t_data *drvdata = i2c_get_clientdata(client); sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr); - - return 0; } static const struct i2c_device_id mc24lc64t_id[] = { diff --git a/platform/pddf/i2c/debian/rules b/platform/pddf/i2c/debian/rules index 4ddbbdfd2405..e1f08e0cf350 100755 --- a/platform/pddf/i2c/debian/rules +++ b/platform/pddf/i2c/debian/rules @@ -13,6 +13,7 @@ include /usr/share/dpkg/pkg-info.mk export INSTALL_MOD_DIR:=extra PYTHON ?= python3 +PIP ?= pip3 PACKAGE_PRE_NAME := sonic-platform-pddf KVERSION ?= $(shell uname -r) @@ -37,7 +38,7 @@ clean: build: set -e; \ make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR); \ - $(PYTHON) $(MOD_SRC_DIR)/setup.py build; \ + $(PYTHON) -m build --wheel --no-isolation $(MOD_SRC_DIR); \ set +e binary: binary-arch binary-indep @@ -59,7 +60,7 @@ binary-indep: # Need to take a backup of symvers file for compilation of custom modules in various platforms cp $(MOD_SRC_DIR)/Module.symvers $(MOD_SRC_DIR)/Module.symvers.PDDF; \ cp -r $(MOD_SRC_DIR)/$(UTILS_DIR)/* debian/$(PACKAGE_PRE_NAME)/usr/local/bin/; \ - $(PYTHON) $(MOD_SRC_DIR)/setup.py install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME) --install-layout=deb; \ + $(PIP) install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME) $(MOD_SRC_DIR)/; \ set +e # Resuming debhelper scripts diff --git a/platform/pddf/i2c/modules/cpld/driver/pddf_cpld_driver.c b/platform/pddf/i2c/modules/cpld/driver/pddf_cpld_driver.c index dabc8f9d8f9c..b85d28ca3d01 100755 --- a/platform/pddf/i2c/modules/cpld/driver/pddf_cpld_driver.c +++ b/platform/pddf/i2c/modules/cpld/driver/pddf_cpld_driver.c @@ -237,7 +237,7 @@ static int board_i2c_cpld_probe(struct i2c_client *client, return status; } -static int board_i2c_cpld_remove(struct i2c_client *client) +static void board_i2c_cpld_remove(struct i2c_client *client) { /* Platform data is just a char string */ char *platdata = (char *)client->dev.platform_data; @@ -247,8 +247,6 @@ static int board_i2c_cpld_remove(struct i2c_client *client) { kfree(platdata); } - - return 0; } static const struct i2c_device_id board_i2c_cpld_id[] = { diff --git a/platform/pddf/i2c/modules/fan/driver/pddf_fan_driver.c b/platform/pddf/i2c/modules/fan/driver/pddf_fan_driver.c index cf83724d1f97..c8d06fd1053c 100644 --- a/platform/pddf/i2c/modules/fan/driver/pddf_fan_driver.c +++ b/platform/pddf/i2c/modules/fan/driver/pddf_fan_driver.c @@ -550,7 +550,7 @@ static int pddf_fan_probe(struct i2c_client *client, return status; } -static int pddf_fan_remove(struct i2c_client *client) +static void pddf_fan_remove(struct i2c_client *client) { int i = 0, ret = 0; struct sensor_device_attribute *ptr = NULL; @@ -590,8 +590,6 @@ static int pddf_fan_remove(struct i2c_client *client) if (ret!=0) printk(KERN_ERR "FAN post_remove function failed\n"); } - - return 0; } /* Addresses to scan */ diff --git a/platform/pddf/i2c/modules/fpgai2c/driver/pddf_fpgai2c_driver.c b/platform/pddf/i2c/modules/fpgai2c/driver/pddf_fpgai2c_driver.c index b3092e5ee81d..e5cf333e14ac 100644 --- a/platform/pddf/i2c/modules/fpgai2c/driver/pddf_fpgai2c_driver.c +++ b/platform/pddf/i2c/modules/fpgai2c/driver/pddf_fpgai2c_driver.c @@ -184,12 +184,10 @@ static int board_i2c_fpga_probe(struct i2c_client *client, return status; } -static int board_i2c_fpga_remove(struct i2c_client *client) +static void board_i2c_fpga_remove(struct i2c_client *client) { sysfs_remove_group(&client->dev.kobj, &fpgai2c_attribute_group); board_i2c_fpga_remove_client(client); - - return 0; } static const struct i2c_device_id board_i2c_fpga_id[] = { diff --git a/platform/pddf/i2c/modules/fpgapci/driver/pddf_fpgapci_driver.c b/platform/pddf/i2c/modules/fpgapci/driver/pddf_fpgapci_driver.c index 630981522b15..424a97fdb7a7 100644 --- a/platform/pddf/i2c/modules/fpgapci/driver/pddf_fpgapci_driver.c +++ b/platform/pddf/i2c/modules/fpgapci/driver/pddf_fpgapci_driver.c @@ -349,4 +349,3 @@ module_exit (pddf_fpgapci_driver_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Broadcom"); MODULE_DESCRIPTION ("PDDF Driver for FPGAPCI Logic I2C bus"); -MODULE_SUPPORTED_DEVICE ("PDDF FPGAPCI Logic I2C bus"); diff --git a/platform/pddf/i2c/modules/psu/driver/pddf_psu_driver.c b/platform/pddf/i2c/modules/psu/driver/pddf_psu_driver.c index bd26f13e9b84..3af93b91a7a3 100644 --- a/platform/pddf/i2c/modules/psu/driver/pddf_psu_driver.c +++ b/platform/pddf/i2c/modules/psu/driver/pddf_psu_driver.c @@ -279,7 +279,7 @@ static int psu_probe(struct i2c_client *client, return status; } -static int psu_remove(struct i2c_client *client) +static void psu_remove(struct i2c_client *client) { int i=0, ret = 0; struct psu_data *data = i2c_get_clientdata(client); @@ -319,8 +319,6 @@ static int psu_remove(struct i2c_client *client) if (ret!=0) printk(KERN_ERR "FAN post_remove function failed\n"); } - - return ret; } enum psu_intf diff --git a/platform/pddf/i2c/modules/xcvr/driver/pddf_xcvr_driver.c b/platform/pddf/i2c/modules/xcvr/driver/pddf_xcvr_driver.c index be4a01acf176..57b6f8b99e06 100644 --- a/platform/pddf/i2c/modules/xcvr/driver/pddf_xcvr_driver.c +++ b/platform/pddf/i2c/modules/xcvr/driver/pddf_xcvr_driver.c @@ -189,7 +189,7 @@ static int xcvr_probe(struct i2c_client *client, return status; } -static int xcvr_remove(struct i2c_client *client) +static void xcvr_remove(struct i2c_client *client) { int ret = 0; struct xcvr_data *data = i2c_get_clientdata(client); @@ -222,8 +222,6 @@ static int xcvr_remove(struct i2c_client *client) if (ret!=0) printk(KERN_ERR "FAN post_remove function failed\n"); } - - return 0; } enum xcvr_intf