From e0e643cdd2dcb1133010bbe44b753603a58c9255 Mon Sep 17 00:00:00 2001 From: Nicholas Ormrod Date: Wed, 20 Nov 2024 22:33:05 -0800 Subject: [PATCH] facebook-unused-include-check in fbcode/fboss/lib Summary: Remove headers flagged by facebook-unused-include-check over fbcode.fboss.lib. + format and autodeps This is a codemod. It was automatically generated and will be landed once it is approved and tests are passing in sandcastle. You have been added as a reviewer by Sentinel or Butterfly. Autodiff project: uif Autodiff partition: fbcode.fboss.lib Autodiff bookmark: ad.uif.fbcode.fboss.lib Reviewed By: dtolnay Differential Revision: D65957931 fbshipit-source-id: af31592369989963647751e1f87612c9c9234da5 --- fboss/lib/AlertLogger.cpp | 2 -- fboss/lib/CommonFileUtils.cpp | 1 - fboss/lib/bsp/BUCK | 2 -- fboss/lib/bsp/BspPhyContainer.cpp | 1 - fboss/lib/bsp/BspPhyIO.cpp | 6 ------ fboss/lib/bsp/BspTransceiverContainer.cpp | 1 - fboss/lib/bsp/BspTransceiverCpldAccess.cpp | 7 ------- fboss/lib/bsp/BspTransceiverGpioAccess.cpp | 1 - fboss/lib/bsp/BspTransceiverIO.cpp | 6 ------ fboss/lib/fpga/BUCK | 3 --- fboss/lib/fpga/FbFpgaI2c.cpp | 1 - fboss/lib/fpga/FbFpgaSpi.cpp | 1 - fboss/lib/fpga/Wedge400I2CBus.cpp | 1 - fboss/lib/i2c/BUCK | 5 ----- fboss/lib/i2c/I2cRdWrIo.cpp | 5 ----- fboss/lib/i2c/I2cSmbusIo.cpp | 5 ----- fboss/lib/phy/BUCK | 2 -- fboss/lib/phy/PhyManager.cpp | 1 - fboss/lib/test/BUCK | 2 -- fboss/lib/test/CommonFileUtilsTest.cpp | 4 ---- fboss/lib/test/PciDeviceTest.cpp | 1 - fboss/lib/usb/Minipack16QI2CBus.cpp | 1 - 22 files changed, 59 deletions(-) diff --git a/fboss/lib/AlertLogger.cpp b/fboss/lib/AlertLogger.cpp index c1cb0b632e777..bff42b1e4a046 100644 --- a/fboss/lib/AlertLogger.cpp +++ b/fboss/lib/AlertLogger.cpp @@ -9,8 +9,6 @@ */ #include "fboss/lib/AlertLogger.h" -#include - namespace facebook::fboss { // Prefix for fboss alert tag diff --git a/fboss/lib/CommonFileUtils.cpp b/fboss/lib/CommonFileUtils.cpp index daa159b7c5d96..e05dcec4283f2 100644 --- a/fboss/lib/CommonFileUtils.cpp +++ b/fboss/lib/CommonFileUtils.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include "fboss/agent/SysError.h" #include diff --git a/fboss/lib/bsp/BUCK b/fboss/lib/bsp/BUCK index 9b921feb542a0..174fdaddd9640 100644 --- a/fboss/lib/bsp/BUCK +++ b/fboss/lib/bsp/BUCK @@ -109,12 +109,10 @@ cpp_library( "//folly:format", "//folly:range", "//folly:singleton", - "//folly/lang:bits", "//folly/logging:logging", "//thrift/lib/cpp/util:enum_utils", ], exported_external_deps = [ - "gflags", ("libgpiod", None, "gpiod"), ], ) diff --git a/fboss/lib/bsp/BspPhyContainer.cpp b/fboss/lib/bsp/BspPhyContainer.cpp index 03c5bc39749d1..9a2f5c37c8a22 100644 --- a/fboss/lib/bsp/BspPhyContainer.cpp +++ b/fboss/lib/bsp/BspPhyContainer.cpp @@ -1,7 +1,6 @@ // (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. #include "fboss/lib/bsp/BspPhyContainer.h" -#include "fboss/lib/bsp/BspPlatformMapping.h" #include "fboss/lib/bsp/gen-cpp2/bsp_platform_mapping_types.h" namespace facebook { diff --git a/fboss/lib/bsp/BspPhyIO.cpp b/fboss/lib/bsp/BspPhyIO.cpp index 132053287ccec..cb680a9200e2d 100644 --- a/fboss/lib/bsp/BspPhyIO.cpp +++ b/fboss/lib/bsp/BspPhyIO.cpp @@ -2,16 +2,10 @@ #include "fboss/lib/bsp/BspPhyIO.h" -#include #include #include -#include #include -#include -#include -#include #include -#include #include "fboss/lib/CommonFileUtils.h" #include "fboss/lib/bsp/gen-cpp2/bsp_platform_mapping_types.h" #include "fboss/mdio/BspDeviceMdio.h" diff --git a/fboss/lib/bsp/BspTransceiverContainer.cpp b/fboss/lib/bsp/BspTransceiverContainer.cpp index b0dcb1e08bfe0..40a5cc3c56b47 100644 --- a/fboss/lib/bsp/BspTransceiverContainer.cpp +++ b/fboss/lib/bsp/BspTransceiverContainer.cpp @@ -1,7 +1,6 @@ // (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. #include "fboss/lib/bsp/BspTransceiverContainer.h" -#include "fboss/lib/bsp/BspPlatformMapping.h" #include "fboss/lib/bsp/gen-cpp2/bsp_platform_mapping_types.h" namespace facebook { diff --git a/fboss/lib/bsp/BspTransceiverCpldAccess.cpp b/fboss/lib/bsp/BspTransceiverCpldAccess.cpp index 0e508f2c55ffe..a04be60e3aab2 100644 --- a/fboss/lib/bsp/BspTransceiverCpldAccess.cpp +++ b/fboss/lib/bsp/BspTransceiverCpldAccess.cpp @@ -2,18 +2,11 @@ #include "fboss/lib/bsp/BspTransceiverCpldAccess.h" -#include #include #include -#include #include -#include -#include -#include #include -#include #include "fboss/lib/CommonFileUtils.h" -#include "fboss/lib/bsp/BspTransceiverAccess.h" #include "fboss/lib/bsp/gen-cpp2/bsp_platform_mapping_types.h" namespace facebook { diff --git a/fboss/lib/bsp/BspTransceiverGpioAccess.cpp b/fboss/lib/bsp/BspTransceiverGpioAccess.cpp index 64af51fb47f85..d77814f3e3214 100644 --- a/fboss/lib/bsp/BspTransceiverGpioAccess.cpp +++ b/fboss/lib/bsp/BspTransceiverGpioAccess.cpp @@ -2,7 +2,6 @@ #include "fboss/lib/bsp/BspTransceiverGpioAccess.h" #include -#include #include #include "fboss/lib/CommonFileUtils.h" #include "fboss/lib/GpiodLine.h" diff --git a/fboss/lib/bsp/BspTransceiverIO.cpp b/fboss/lib/bsp/BspTransceiverIO.cpp index bf41b0ce4e811..55984b90f51cd 100644 --- a/fboss/lib/bsp/BspTransceiverIO.cpp +++ b/fboss/lib/bsp/BspTransceiverIO.cpp @@ -2,16 +2,10 @@ #include "fboss/lib/bsp/BspTransceiverIO.h" -#include #include #include -#include #include -#include -#include -#include #include -#include #include "fboss/lib/CommonFileUtils.h" #include "fboss/lib/bsp/gen-cpp2/bsp_platform_mapping_types.h" diff --git a/fboss/lib/fpga/BUCK b/fboss/lib/fpga/BUCK index 6ec51a953e9af..b90847b503fba 100644 --- a/fboss/lib/fpga/BUCK +++ b/fboss/lib/fpga/BUCK @@ -51,7 +51,6 @@ cpp_library( "//fboss/agent:utils", "//fboss/lib/i2c:i2c_ctrl", "//fboss/lib/usb:i2-api", - "//folly:cpp_attributes", "//folly:format", "//folly:range", "//folly:synchronized", @@ -74,7 +73,6 @@ cpp_library( "//fboss/agent:utils", "//fboss/lib/i2c:i2c_ctrl", "//fboss/lib/usb:i2-api", - "//folly:cpp_attributes", "//folly:format", "//folly:range", "//folly:synchronized", @@ -161,7 +159,6 @@ cpp_library( ":fb_fpga_i2c", ":wedge400_fpga", "//fboss/agent:utils", - "//fboss/lib:pci_access", "//fboss/lib/usb:i2-api", "//folly:format", "//folly/logging:logging", diff --git a/fboss/lib/fpga/FbFpgaI2c.cpp b/fboss/lib/fpga/FbFpgaI2c.cpp index b4fb2b2ded4f8..61a76d7688e81 100644 --- a/fboss/lib/fpga/FbFpgaI2c.cpp +++ b/fboss/lib/fpga/FbFpgaI2c.cpp @@ -5,7 +5,6 @@ #include "fboss/agent/Utils.h" #include "fboss/lib/fpga/FbFpgaRegisters.h" -#include #include #include #include diff --git a/fboss/lib/fpga/FbFpgaSpi.cpp b/fboss/lib/fpga/FbFpgaSpi.cpp index 5fb7b72aca503..98b76e60e6f9a 100644 --- a/fboss/lib/fpga/FbFpgaSpi.cpp +++ b/fboss/lib/fpga/FbFpgaSpi.cpp @@ -5,7 +5,6 @@ #include "fboss/agent/Utils.h" #include "fboss/lib/fpga/FbFpgaRegisters.h" -#include #include #include #include diff --git a/fboss/lib/fpga/Wedge400I2CBus.cpp b/fboss/lib/fpga/Wedge400I2CBus.cpp index 661193d0532e1..fd3b964f08c21 100644 --- a/fboss/lib/fpga/Wedge400I2CBus.cpp +++ b/fboss/lib/fpga/Wedge400I2CBus.cpp @@ -3,7 +3,6 @@ #include "fboss/lib/fpga/Wedge400I2CBus.h" #include "fboss/agent/Utils.h" -#include "fboss/lib/PciAccess.h" #include "fboss/lib/fpga/Wedge400Fpga.h" #include "fboss/lib/usb/TransceiverI2CApi.h" diff --git a/fboss/lib/i2c/BUCK b/fboss/lib/i2c/BUCK index 47ef7233224c2..d5c4eb2489bae 100644 --- a/fboss/lib/i2c/BUCK +++ b/fboss/lib/i2c/BUCK @@ -44,13 +44,8 @@ cpp_library( ":i2c_controller_stats-cpp2-types", "//fboss/agent:utils", "//folly:format", - "//folly:range", "//folly:synchronized", "//folly/io/async:async_base", - "//folly/lang:bits", "//folly/logging:logging", ], - exported_external_deps = [ - "gflags", - ], ) diff --git a/fboss/lib/i2c/I2cRdWrIo.cpp b/fboss/lib/i2c/I2cRdWrIo.cpp index de26e48dc8c36..10b3821b5fa43 100644 --- a/fboss/lib/i2c/I2cRdWrIo.cpp +++ b/fboss/lib/i2c/I2cRdWrIo.cpp @@ -2,12 +2,7 @@ #include "fboss/lib/i2c/I2cRdWrIo.h" #include -#include #include -#include -#include -#include -#include #include #include #include diff --git a/fboss/lib/i2c/I2cSmbusIo.cpp b/fboss/lib/i2c/I2cSmbusIo.cpp index b4574924aca6c..66f968e25e56d 100644 --- a/fboss/lib/i2c/I2cSmbusIo.cpp +++ b/fboss/lib/i2c/I2cSmbusIo.cpp @@ -2,12 +2,7 @@ #include "fboss/lib/i2c/I2cSmbusIo.h" #include -#include #include -#include -#include -#include -#include #include #include #include diff --git a/fboss/lib/phy/BUCK b/fboss/lib/phy/BUCK index 102eb1c99039c..072ed7816f0e1 100644 --- a/fboss/lib/phy/BUCK +++ b/fboss/lib/phy/BUCK @@ -141,7 +141,6 @@ cpp_library( "//fboss/mka_service/if:mka_structs-cpp2-types", "//folly:synchronized", "//folly/futures:core", - "//folly/json:dynamic", "//folly/logging:logging", "//thrift/lib/cpp/util:enum_utils", ], @@ -177,7 +176,6 @@ cpp_library( "//fboss/lib/phy/facebook/credo:credo", "//fboss/mdio:facebook_fpga_mdio", "//folly:conv", - "//folly:random", "//folly/logging:logging", ], ) diff --git a/fboss/lib/phy/PhyManager.cpp b/fboss/lib/phy/PhyManager.cpp index 1cf9034eab0cc..be709dacce85d 100644 --- a/fboss/lib/phy/PhyManager.cpp +++ b/fboss/lib/phy/PhyManager.cpp @@ -12,7 +12,6 @@ #include "fboss/lib/phy/gen-cpp2/phy_types.h" #include -#include #include #include #include diff --git a/fboss/lib/test/BUCK b/fboss/lib/test/BUCK index 5f5b7f10a0681..49c543036cfc7 100644 --- a/fboss/lib/test/BUCK +++ b/fboss/lib/test/BUCK @@ -169,7 +169,6 @@ cpp_unittest( "CommonPortUtilsTest.cpp", ], deps = [ - "//fboss/agent:fboss-error", "//fboss/lib:common_file_utils", "//fboss/lib:common_port_utils", "//folly:format", @@ -179,6 +178,5 @@ cpp_unittest( ], external_deps = [ "glog", - ("boost", None, "boost_filesystem"), ], ) diff --git a/fboss/lib/test/CommonFileUtilsTest.cpp b/fboss/lib/test/CommonFileUtilsTest.cpp index 49aa35e7efa50..96dd407d68f7d 100644 --- a/fboss/lib/test/CommonFileUtilsTest.cpp +++ b/fboss/lib/test/CommonFileUtilsTest.cpp @@ -1,13 +1,9 @@ // (c) Facebook, Inc. and its affiliates. Confidential and proprietary. #include "fboss/lib/CommonFileUtils.h" -#include #include #include #include -#include "fboss/agent/SysError.h" - -#include namespace facebook::fboss { diff --git a/fboss/lib/test/PciDeviceTest.cpp b/fboss/lib/test/PciDeviceTest.cpp index de7674190083c..df2f070cd9599 100644 --- a/fboss/lib/test/PciDeviceTest.cpp +++ b/fboss/lib/test/PciDeviceTest.cpp @@ -11,7 +11,6 @@ #include #include #include -#include extern "C" { #include diff --git a/fboss/lib/usb/Minipack16QI2CBus.cpp b/fboss/lib/usb/Minipack16QI2CBus.cpp index bc277b7700812..7cf7a851ae0fc 100644 --- a/fboss/lib/usb/Minipack16QI2CBus.cpp +++ b/fboss/lib/usb/Minipack16QI2CBus.cpp @@ -11,7 +11,6 @@ #include "fboss/lib/fpga/MinipackSystemContainer.h" #include -#include namespace facebook::fboss { Minipack16QI2CBus::Minipack16QI2CBus() {