While working on something totally different, it occurred to me to wonder
which header files in the kernel are not used anywhere. Writing a little
program to figure that out in Rust was the perfect distriction from the
work I really needed to be doing... It turns out there aren't many under
include/linux; this gets rid of the ones I found.
Jonathan Corbet (9):
Remove unused headers <linux/jz4740-adc.h> and
<linux/power/jz4740-battery.h>
nfs: remove unused header <linux/pnfs_osd_xdr.h>
Remove unused header <linux/cnt32_to_63.h>
Remove unused header <linux/sdb.h>
Input: remove unused header <linux/input/cy8ctmg110_pdata.h>
mtd: remove unused header file <linux/mtd/latch-addr-flash.h>
ARM: ixp4xx: remove unused header file pata_ixp4xx_cf.h
spi: remove unused header file <linux/platform_data/spi-clps711x.h>
net: remove unused header file <linux/ks8851_mll.h>
include/linux/cnt32_to_63.h | 104 ------
include/linux/input/cy8ctmg110_pdata.h | 10 -
include/linux/jz4740-adc.h | 33 --
include/linux/ks8851_mll.h | 21 --
include/linux/mtd/latch-addr-flash.h | 29 --
include/linux/platform_data/pata_ixp4xx_cf.h | 21 --
include/linux/platform_data/spi-clps711x.h | 17 -
include/linux/pnfs_osd_xdr.h | 317 -------------------
include/linux/power/jz4740-battery.h | 15 -
include/linux/sdb.h | 160 ----------
10 files changed, 727 deletions(-)
delete mode 100644 include/linux/cnt32_to_63.h
delete mode 100644 include/linux/input/cy8ctmg110_pdata.h
delete mode 100644 include/linux/jz4740-adc.h
delete mode 100644 include/linux/ks8851_mll.h
delete mode 100644 include/linux/mtd/latch-addr-flash.h
delete mode 100644 include/linux/platform_data/pata_ixp4xx_cf.h
delete mode 100644 include/linux/platform_data/spi-clps711x.h
delete mode 100644 include/linux/pnfs_osd_xdr.h
delete mode 100644 include/linux/power/jz4740-battery.h
delete mode 100644 include/linux/sdb.h
--
2.31.1
Commit ff71266aa490 ("mfd: Drop obsolete JZ4740 driver") removed the last
file to include <linux/jz4740-adc.h> but left the header file itself
behind. Nothing uses it, remove it now.
Similarly, aea12071d6fc ("power/supply: Drop obsolete JZ4740 driver")
deleted the last use of <linux/power/jz4740-battery.h>, so remove that one
too.
Cc: Paul Cercueil <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: Sebastian Reichel <[email protected]>
Cc: [email protected]
Signed-off-by: Jonathan Corbet <[email protected]>
---
include/linux/jz4740-adc.h | 33 ----------------------------
include/linux/power/jz4740-battery.h | 15 -------------
2 files changed, 48 deletions(-)
delete mode 100644 include/linux/jz4740-adc.h
delete mode 100644 include/linux/power/jz4740-battery.h
diff --git a/include/linux/jz4740-adc.h b/include/linux/jz4740-adc.h
deleted file mode 100644
index 19d995c8bf06..000000000000
--- a/include/linux/jz4740-adc.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-#ifndef __LINUX_JZ4740_ADC
-#define __LINUX_JZ4740_ADC
-
-struct device;
-
-/*
- * jz4740_adc_set_config - Configure a JZ4740 adc device
- * @dev: Pointer to a jz4740-adc device
- * @mask: Mask for the config value to be set
- * @val: Value to be set
- *
- * This function can be used by the JZ4740 ADC mfd cells to configure their
- * options in the shared config register.
-*/
-int jz4740_adc_set_config(struct device *dev, uint32_t mask, uint32_t val);
-
-#define JZ_ADC_CONFIG_SPZZ BIT(31)
-#define JZ_ADC_CONFIG_EX_IN BIT(30)
-#define JZ_ADC_CONFIG_DNUM_MASK (0x7 << 16)
-#define JZ_ADC_CONFIG_DMA_ENABLE BIT(15)
-#define JZ_ADC_CONFIG_XYZ_MASK (0x2 << 13)
-#define JZ_ADC_CONFIG_SAMPLE_NUM_MASK (0x7 << 10)
-#define JZ_ADC_CONFIG_CLKDIV_MASK (0xf << 5)
-#define JZ_ADC_CONFIG_BAT_MB BIT(4)
-
-#define JZ_ADC_CONFIG_DNUM(dnum) ((dnum) << 16)
-#define JZ_ADC_CONFIG_XYZ_OFFSET(dnum) ((xyz) << 13)
-#define JZ_ADC_CONFIG_SAMPLE_NUM(x) ((x) << 10)
-#define JZ_ADC_CONFIG_CLKDIV(div) ((div) << 5)
-
-#endif
diff --git a/include/linux/power/jz4740-battery.h b/include/linux/power/jz4740-battery.h
deleted file mode 100644
index 10da211678c8..000000000000
--- a/include/linux/power/jz4740-battery.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (C) 2009, Jiejing Zhang <[email protected]>
- */
-
-#ifndef __JZ4740_BATTERY_H
-#define __JZ4740_BATTERY_H
-
-struct jz_battery_platform_data {
- struct power_supply_info info;
- int gpio_charge; /* GPIO port of Charger state */
- int gpio_charge_active_low;
-};
-
-#endif
--
2.31.1
Commit 19fcae3d4f2dd ("scsi: remove the SCSI OSD library") deleted the last
file that included <linux/pnfs_osd_xdr.h> but left that file behind. It's
unused, get rid of it now.
Cc: Christoph Hellwig <[email protected]>
Cc: Trond Myklebust <[email protected]>
Cc: Anna Schumaker <[email protected]>
Cc: [email protected]
Signed-off-by: Jonathan Corbet <[email protected]>
---
include/linux/pnfs_osd_xdr.h | 317 -----------------------------------
1 file changed, 317 deletions(-)
delete mode 100644 include/linux/pnfs_osd_xdr.h
diff --git a/include/linux/pnfs_osd_xdr.h b/include/linux/pnfs_osd_xdr.h
deleted file mode 100644
index 17d7d0d20eca..000000000000
--- a/include/linux/pnfs_osd_xdr.h
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * pNFS-osd on-the-wire data structures
- *
- * Copyright (C) 2007 Panasas Inc. [year of first publication]
- * All rights reserved.
- *
- * Benny Halevy <[email protected]>
- * Boaz Harrosh <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * See the file COPYING included with this distribution for more details.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Panasas company nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef __PNFS_OSD_XDR_H__
-#define __PNFS_OSD_XDR_H__
-
-#include <linux/nfs_fs.h>
-
-/*
- * draft-ietf-nfsv4-minorversion-22
- * draft-ietf-nfsv4-pnfs-obj-12
- */
-
-/* Layout Structure */
-
-enum pnfs_osd_raid_algorithm4 {
- PNFS_OSD_RAID_0 = 1,
- PNFS_OSD_RAID_4 = 2,
- PNFS_OSD_RAID_5 = 3,
- PNFS_OSD_RAID_PQ = 4 /* Reed-Solomon P+Q */
-};
-
-/* struct pnfs_osd_data_map4 {
- * uint32_t odm_num_comps;
- * length4 odm_stripe_unit;
- * uint32_t odm_group_width;
- * uint32_t odm_group_depth;
- * uint32_t odm_mirror_cnt;
- * pnfs_osd_raid_algorithm4 odm_raid_algorithm;
- * };
- */
-struct pnfs_osd_data_map {
- u32 odm_num_comps;
- u64 odm_stripe_unit;
- u32 odm_group_width;
- u32 odm_group_depth;
- u32 odm_mirror_cnt;
- u32 odm_raid_algorithm;
-};
-
-/* struct pnfs_osd_objid4 {
- * deviceid4 oid_device_id;
- * uint64_t oid_partition_id;
- * uint64_t oid_object_id;
- * };
- */
-struct pnfs_osd_objid {
- struct nfs4_deviceid oid_device_id;
- u64 oid_partition_id;
- u64 oid_object_id;
-};
-
-/* For printout. I use:
- * kprint("dev(%llx:%llx)", _DEVID_LO(pointer), _DEVID_HI(pointer));
- * BE style
- */
-#define _DEVID_LO(oid_device_id) \
- (unsigned long long)be64_to_cpup((__be64 *)(oid_device_id)->data)
-
-#define _DEVID_HI(oid_device_id) \
- (unsigned long long)be64_to_cpup(((__be64 *)(oid_device_id)->data) + 1)
-
-enum pnfs_osd_version {
- PNFS_OSD_MISSING = 0,
- PNFS_OSD_VERSION_1 = 1,
- PNFS_OSD_VERSION_2 = 2
-};
-
-struct pnfs_osd_opaque_cred {
- u32 cred_len;
- void *cred;
-};
-
-enum pnfs_osd_cap_key_sec {
- PNFS_OSD_CAP_KEY_SEC_NONE = 0,
- PNFS_OSD_CAP_KEY_SEC_SSV = 1,
-};
-
-/* struct pnfs_osd_object_cred4 {
- * pnfs_osd_objid4 oc_object_id;
- * pnfs_osd_version4 oc_osd_version;
- * pnfs_osd_cap_key_sec4 oc_cap_key_sec;
- * opaque oc_capability_key<>;
- * opaque oc_capability<>;
- * };
- */
-struct pnfs_osd_object_cred {
- struct pnfs_osd_objid oc_object_id;
- u32 oc_osd_version;
- u32 oc_cap_key_sec;
- struct pnfs_osd_opaque_cred oc_cap_key;
- struct pnfs_osd_opaque_cred oc_cap;
-};
-
-/* struct pnfs_osd_layout4 {
- * pnfs_osd_data_map4 olo_map;
- * uint32_t olo_comps_index;
- * pnfs_osd_object_cred4 olo_components<>;
- * };
- */
-struct pnfs_osd_layout {
- struct pnfs_osd_data_map olo_map;
- u32 olo_comps_index;
- u32 olo_num_comps;
- struct pnfs_osd_object_cred *olo_comps;
-};
-
-/* Device Address */
-enum pnfs_osd_targetid_type {
- OBJ_TARGET_ANON = 1,
- OBJ_TARGET_SCSI_NAME = 2,
- OBJ_TARGET_SCSI_DEVICE_ID = 3,
-};
-
-/* union pnfs_osd_targetid4 switch (pnfs_osd_targetid_type4 oti_type) {
- * case OBJ_TARGET_SCSI_NAME:
- * string oti_scsi_name<>;
- *
- * case OBJ_TARGET_SCSI_DEVICE_ID:
- * opaque oti_scsi_device_id<>;
- *
- * default:
- * void;
- * };
- *
- * union pnfs_osd_targetaddr4 switch (bool ota_available) {
- * case TRUE:
- * netaddr4 ota_netaddr;
- * case FALSE:
- * void;
- * };
- *
- * struct pnfs_osd_deviceaddr4 {
- * pnfs_osd_targetid4 oda_targetid;
- * pnfs_osd_targetaddr4 oda_targetaddr;
- * uint64_t oda_lun;
- * opaque oda_systemid<>;
- * pnfs_osd_object_cred4 oda_root_obj_cred;
- * opaque oda_osdname<>;
- * };
- */
-struct pnfs_osd_targetid {
- u32 oti_type;
- struct nfs4_string oti_scsi_device_id;
-};
-
-/* struct netaddr4 {
- * // see struct rpcb in RFC1833
- * string r_netid<>; // network id
- * string r_addr<>; // universal address
- * };
- */
-struct pnfs_osd_net_addr {
- struct nfs4_string r_netid;
- struct nfs4_string r_addr;
-};
-
-struct pnfs_osd_targetaddr {
- u32 ota_available;
- struct pnfs_osd_net_addr ota_netaddr;
-};
-
-struct pnfs_osd_deviceaddr {
- struct pnfs_osd_targetid oda_targetid;
- struct pnfs_osd_targetaddr oda_targetaddr;
- u8 oda_lun[8];
- struct nfs4_string oda_systemid;
- struct pnfs_osd_object_cred oda_root_obj_cred;
- struct nfs4_string oda_osdname;
-};
-
-/* LAYOUTCOMMIT: layoutupdate */
-
-/* union pnfs_osd_deltaspaceused4 switch (bool dsu_valid) {
- * case TRUE:
- * int64_t dsu_delta;
- * case FALSE:
- * void;
- * };
- *
- * struct pnfs_osd_layoutupdate4 {
- * pnfs_osd_deltaspaceused4 olu_delta_space_used;
- * bool olu_ioerr_flag;
- * };
- */
-struct pnfs_osd_layoutupdate {
- u32 dsu_valid;
- s64 dsu_delta;
- u32 olu_ioerr_flag;
-};
-
-/* LAYOUTRETURN: I/O Rrror Report */
-
-enum pnfs_osd_errno {
- PNFS_OSD_ERR_EIO = 1,
- PNFS_OSD_ERR_NOT_FOUND = 2,
- PNFS_OSD_ERR_NO_SPACE = 3,
- PNFS_OSD_ERR_BAD_CRED = 4,
- PNFS_OSD_ERR_NO_ACCESS = 5,
- PNFS_OSD_ERR_UNREACHABLE = 6,
- PNFS_OSD_ERR_RESOURCE = 7
-};
-
-/* struct pnfs_osd_ioerr4 {
- * pnfs_osd_objid4 oer_component;
- * length4 oer_comp_offset;
- * length4 oer_comp_length;
- * bool oer_iswrite;
- * pnfs_osd_errno4 oer_errno;
- * };
- */
-struct pnfs_osd_ioerr {
- struct pnfs_osd_objid oer_component;
- u64 oer_comp_offset;
- u64 oer_comp_length;
- u32 oer_iswrite;
- u32 oer_errno;
-};
-
-/* OSD XDR Client API */
-/* Layout helpers */
-/* Layout decoding is done in two parts:
- * 1. First Call pnfs_osd_xdr_decode_layout_map to read in only the header part
- * of the layout. @iter members need not be initialized.
- * Returned:
- * @layout members are set. (@layout->olo_comps set to NULL).
- *
- * Zero on success, or negative error if passed xdr is broken.
- *
- * 2. 2nd Call pnfs_osd_xdr_decode_layout_comp() in a loop until it returns
- * false, to decode the next component.
- * Returned:
- * true if there is more to decode or false if we are done or error.
- *
- * Example:
- * struct pnfs_osd_xdr_decode_layout_iter iter;
- * struct pnfs_osd_layout layout;
- * struct pnfs_osd_object_cred comp;
- * int status;
- *
- * status = pnfs_osd_xdr_decode_layout_map(&layout, &iter, xdr);
- * if (unlikely(status))
- * goto err;
- * while(pnfs_osd_xdr_decode_layout_comp(&comp, &iter, xdr, &status)) {
- * // All of @comp strings point to inside the xdr_buffer
- * // or scrach buffer. Copy them out to user memory eg.
- * copy_single_comp(dest_comp++, &comp);
- * }
- * if (unlikely(status))
- * goto err;
- */
-
-struct pnfs_osd_xdr_decode_layout_iter {
- unsigned total_comps;
- unsigned decoded_comps;
-};
-
-extern int pnfs_osd_xdr_decode_layout_map(struct pnfs_osd_layout *layout,
- struct pnfs_osd_xdr_decode_layout_iter *iter, struct xdr_stream *xdr);
-
-extern bool pnfs_osd_xdr_decode_layout_comp(struct pnfs_osd_object_cred *comp,
- struct pnfs_osd_xdr_decode_layout_iter *iter, struct xdr_stream *xdr,
- int *err);
-
-/* Device Info helpers */
-
-/* Note: All strings inside @deviceaddr point to space inside @p.
- * @p should stay valid while @deviceaddr is in use.
- */
-extern void pnfs_osd_xdr_decode_deviceaddr(
- struct pnfs_osd_deviceaddr *deviceaddr, __be32 *p);
-
-/* layoutupdate (layout_commit) xdr helpers */
-extern int
-pnfs_osd_xdr_encode_layoutupdate(struct xdr_stream *xdr,
- struct pnfs_osd_layoutupdate *lou);
-
-/* osd_ioerror encoding (layout_return) */
-extern __be32 *pnfs_osd_xdr_ioerr_reserve_space(struct xdr_stream *xdr);
-extern void pnfs_osd_xdr_encode_ioerr(__be32 *p, struct pnfs_osd_ioerr *ioerr);
-
-#endif /* __PNFS_OSD_XDR_H__ */
--
2.31.1
Commit fb37409a01b0 ("arch: remove unicore32 port) deleted the last file
that included <linux/cnt32_to_63.h>, but left that header file behind.
Nothing uses it, delete it now.
Cc: Nicolas Pitre <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
---
include/linux/cnt32_to_63.h | 104 ------------------------------------
1 file changed, 104 deletions(-)
delete mode 100644 include/linux/cnt32_to_63.h
diff --git a/include/linux/cnt32_to_63.h b/include/linux/cnt32_to_63.h
deleted file mode 100644
index 064428479f2d..000000000000
--- a/include/linux/cnt32_to_63.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Extend a 32-bit counter to 63 bits
- *
- * Author: Nicolas Pitre
- * Created: December 3, 2006
- * Copyright: MontaVista Software, Inc.
- */
-
-#ifndef __LINUX_CNT32_TO_63_H__
-#define __LINUX_CNT32_TO_63_H__
-
-#include <linux/compiler.h>
-#include <linux/types.h>
-#include <asm/byteorder.h>
-
-/* this is used only to give gcc a clue about good code generation */
-union cnt32_to_63 {
- struct {
-#if defined(__LITTLE_ENDIAN)
- u32 lo, hi;
-#elif defined(__BIG_ENDIAN)
- u32 hi, lo;
-#endif
- };
- u64 val;
-};
-
-
-/**
- * cnt32_to_63 - Expand a 32-bit counter to a 63-bit counter
- * @cnt_lo: The low part of the counter
- *
- * Many hardware clock counters are only 32 bits wide and therefore have
- * a relatively short period making wrap-arounds rather frequent. This
- * is a problem when implementing sched_clock() for example, where a 64-bit
- * non-wrapping monotonic value is expected to be returned.
- *
- * To overcome that limitation, let's extend a 32-bit counter to 63 bits
- * in a completely lock free fashion. Bits 0 to 31 of the clock are provided
- * by the hardware while bits 32 to 62 are stored in memory. The top bit in
- * memory is used to synchronize with the hardware clock half-period. When
- * the top bit of both counters (hardware and in memory) differ then the
- * memory is updated with a new value, incrementing it when the hardware
- * counter wraps around.
- *
- * Because a word store in memory is atomic then the incremented value will
- * always be in synch with the top bit indicating to any potential concurrent
- * reader if the value in memory is up to date or not with regards to the
- * needed increment. And any race in updating the value in memory is harmless
- * as the same value would simply be stored more than once.
- *
- * The restrictions for the algorithm to work properly are:
- *
- * 1) this code must be called at least once per each half period of the
- * 32-bit counter;
- *
- * 2) this code must not be preempted for a duration longer than the
- * 32-bit counter half period minus the longest period between two
- * calls to this code;
- *
- * Those requirements ensure proper update to the state bit in memory.
- * This is usually not a problem in practice, but if it is then a kernel
- * timer should be scheduled to manage for this code to be executed often
- * enough.
- *
- * And finally:
- *
- * 3) the cnt_lo argument must be seen as a globally incrementing value,
- * meaning that it should be a direct reference to the counter data which
- * can be evaluated according to a specific ordering within the macro,
- * and not the result of a previous evaluation stored in a variable.
- *
- * For example, this is wrong:
- *
- * u32 partial = get_hw_count();
- * u64 full = cnt32_to_63(partial);
- * return full;
- *
- * This is fine:
- *
- * u64 full = cnt32_to_63(get_hw_count());
- * return full;
- *
- * Note that the top bit (bit 63) in the returned value should be considered
- * as garbage. It is not cleared here because callers are likely to use a
- * multiplier on the returned value which can get rid of the top bit
- * implicitly by making the multiplier even, therefore saving on a runtime
- * clear-bit instruction. Otherwise caller must remember to clear the top
- * bit explicitly.
- */
-#define cnt32_to_63(cnt_lo) \
-({ \
- static u32 __m_cnt_hi; \
- union cnt32_to_63 __x; \
- __x.hi = __m_cnt_hi; \
- smp_rmb(); \
- __x.lo = (cnt_lo); \
- if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \
- __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \
- __x.val; \
-})
-
-#endif
--
2.31.1
Commit 6a80b30086b8 ("fmc: Delete the FMC subsystem") removed the last user
of <linux/sdb.h>, but left the header file behind. Nothing uses this file,
delete it now.
Cc: Linus Walleij <[email protected]>
Cc: Alessandro Rubini <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
---
include/linux/sdb.h | 160 --------------------------------------------
1 file changed, 160 deletions(-)
delete mode 100644 include/linux/sdb.h
diff --git a/include/linux/sdb.h b/include/linux/sdb.h
deleted file mode 100644
index a2404a2bbd10..000000000000
--- a/include/linux/sdb.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * This is the official version 1.1 of sdb.h
- */
-#ifndef __SDB_H__
-#define __SDB_H__
-#ifdef __KERNEL__
-#include <linux/types.h>
-#else
-#include <stdint.h>
-#endif
-
-/*
- * All structures are 64 bytes long and are expected
- * to live in an array, one for each interconnect.
- * Most fields of the structures are shared among the
- * various types, and most-specific fields are at the
- * beginning (for alignment reasons, and to keep the
- * magic number at the head of the interconnect record
- */
-
-/* Product, 40 bytes at offset 24, 8-byte aligned
- *
- * device_id is vendor-assigned; version is device-specific,
- * date is hex (e.g 0x20120501), name is UTF-8, blank-filled
- * and not terminated with a 0 byte.
- */
-struct sdb_product {
- uint64_t vendor_id; /* 0x18..0x1f */
- uint32_t device_id; /* 0x20..0x23 */
- uint32_t version; /* 0x24..0x27 */
- uint32_t date; /* 0x28..0x2b */
- uint8_t name[19]; /* 0x2c..0x3e */
- uint8_t record_type; /* 0x3f */
-};
-
-/*
- * Component, 56 bytes at offset 8, 8-byte aligned
- *
- * The address range is first to last, inclusive
- * (for example 0x100000 - 0x10ffff)
- */
-struct sdb_component {
- uint64_t addr_first; /* 0x08..0x0f */
- uint64_t addr_last; /* 0x10..0x17 */
- struct sdb_product product; /* 0x18..0x3f */
-};
-
-/* Type of the SDB record */
-enum sdb_record_type {
- sdb_type_interconnect = 0x00,
- sdb_type_device = 0x01,
- sdb_type_bridge = 0x02,
- sdb_type_integration = 0x80,
- sdb_type_repo_url = 0x81,
- sdb_type_synthesis = 0x82,
- sdb_type_empty = 0xFF,
-};
-
-/* Type 0: interconnect (first of the array)
- *
- * sdb_records is the length of the table including this first
- * record, version is 1. The bus type is enumerated later.
- */
-#define SDB_MAGIC 0x5344422d /* "SDB-" */
-struct sdb_interconnect {
- uint32_t sdb_magic; /* 0x00-0x03 */
- uint16_t sdb_records; /* 0x04-0x05 */
- uint8_t sdb_version; /* 0x06 */
- uint8_t sdb_bus_type; /* 0x07 */
- struct sdb_component sdb_component; /* 0x08-0x3f */
-};
-
-/* Type 1: device
- *
- * class is 0 for "custom device", other values are
- * to be standardized; ABI version is for the driver,
- * bus-specific bits are defined by each bus (see below)
- */
-struct sdb_device {
- uint16_t abi_class; /* 0x00-0x01 */
- uint8_t abi_ver_major; /* 0x02 */
- uint8_t abi_ver_minor; /* 0x03 */
- uint32_t bus_specific; /* 0x04-0x07 */
- struct sdb_component sdb_component; /* 0x08-0x3f */
-};
-
-/* Type 2: bridge
- *
- * child is the address of the nested SDB table
- */
-struct sdb_bridge {
- uint64_t sdb_child; /* 0x00-0x07 */
- struct sdb_component sdb_component; /* 0x08-0x3f */
-};
-
-/* Type 0x80: integration
- *
- * all types with bit 7 set are meta-information, so
- * software can ignore the types it doesn't know. Here we
- * just provide product information for an aggregate device
- */
-struct sdb_integration {
- uint8_t reserved[24]; /* 0x00-0x17 */
- struct sdb_product product; /* 0x08-0x3f */
-};
-
-/* Type 0x81: Top module repository url
- *
- * again, an informative field that software can ignore
- */
-struct sdb_repo_url {
- uint8_t repo_url[63]; /* 0x00-0x3e */
- uint8_t record_type; /* 0x3f */
-};
-
-/* Type 0x82: Synthesis tool information
- *
- * this informative record
- */
-struct sdb_synthesis {
- uint8_t syn_name[16]; /* 0x00-0x0f */
- uint8_t commit_id[16]; /* 0x10-0x1f */
- uint8_t tool_name[8]; /* 0x20-0x27 */
- uint32_t tool_version; /* 0x28-0x2b */
- uint32_t date; /* 0x2c-0x2f */
- uint8_t user_name[15]; /* 0x30-0x3e */
- uint8_t record_type; /* 0x3f */
-};
-
-/* Type 0xff: empty
- *
- * this allows keeping empty slots during development,
- * so they can be filled later with minimal efforts and
- * no misleading description is ever shipped -- hopefully.
- * It can also be used to pad a table to a desired length.
- */
-struct sdb_empty {
- uint8_t reserved[63]; /* 0x00-0x3e */
- uint8_t record_type; /* 0x3f */
-};
-
-/* The type of bus, for bus-specific flags */
-enum sdb_bus_type {
- sdb_wishbone = 0x00,
- sdb_data = 0x01,
-};
-
-#define SDB_WB_WIDTH_MASK 0x0f
-#define SDB_WB_ACCESS8 0x01
-#define SDB_WB_ACCESS16 0x02
-#define SDB_WB_ACCESS32 0x04
-#define SDB_WB_ACCESS64 0x08
-#define SDB_WB_LITTLE_ENDIAN 0x80
-
-#define SDB_DATA_READ 0x04
-#define SDB_DATA_WRITE 0x02
-#define SDB_DATA_EXEC 0x01
-
-#endif /* __SDB_H__ */
--
2.31.1
Commit d24dbd7541ff ("mtd: maps: Get rid of the latch-addr-flash driver")
removed the last user of <linux/mtd/latch-addr-flash.h> but left the header
file behind. Nothing uses this file, delete it now.
Cc: Boris Brezillon <[email protected]>
Cc: Miquel Raynal <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Vignesh Raghavendra <[email protected]>
Cc: [email protected]
Signed-off-by: Jonathan Corbet <[email protected]>
---
include/linux/mtd/latch-addr-flash.h | 29 ----------------------------
1 file changed, 29 deletions(-)
delete mode 100644 include/linux/mtd/latch-addr-flash.h
diff --git a/include/linux/mtd/latch-addr-flash.h b/include/linux/mtd/latch-addr-flash.h
deleted file mode 100644
index e94b8e128074..000000000000
--- a/include/linux/mtd/latch-addr-flash.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Interface for NOR flash driver whose high address lines are latched
- *
- * Copyright © 2008 MontaVista Software, Inc. <[email protected]>
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
- */
-#ifndef __LATCH_ADDR_FLASH__
-#define __LATCH_ADDR_FLASH__
-
-struct map_info;
-struct mtd_partition;
-
-struct latch_addr_flash_data {
- unsigned int width;
- unsigned int size;
-
- int (*init)(void *data, int cs);
- void (*done)(void *data);
- void (*set_window)(unsigned long offset, void *data);
- void *data;
-
- unsigned int nr_parts;
- struct mtd_partition *parts;
-};
-
-#endif
--
2.31.1
Commit 83b41248ed04 ("Input: cy8ctmg110_ts - switch to using gpiod API")
remove the last use of <linux/input/cy8ctmg110_pdata.h> but left the header
file behind. Nothing uses it now, delete it.
Cc: Dmitry Torokhov <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
---
include/linux/input/cy8ctmg110_pdata.h | 10 ----------
1 file changed, 10 deletions(-)
delete mode 100644 include/linux/input/cy8ctmg110_pdata.h
diff --git a/include/linux/input/cy8ctmg110_pdata.h b/include/linux/input/cy8ctmg110_pdata.h
deleted file mode 100644
index ee1d44545f30..000000000000
--- a/include/linux/input/cy8ctmg110_pdata.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _LINUX_CY8CTMG110_PDATA_H
-#define _LINUX_CY8CTMG110_PDATA_H
-
-struct cy8ctmg110_pdata
-{
- int reset_pin; /* Reset pin is wired to this GPIO (optional) */
-};
-
-#endif
--
2.31.1
Commit b00ced38e317 ("ARM: ixp4xx: Delete Avila boardfiles") removed the
last use of <linux/platform_data/pata_ixp4xx_cf.h> but left the header file
in place. Nothing uses this file, delete it now.
Cc: Linus Walleij <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
---
include/linux/platform_data/pata_ixp4xx_cf.h | 21 --------------------
1 file changed, 21 deletions(-)
delete mode 100644 include/linux/platform_data/pata_ixp4xx_cf.h
diff --git a/include/linux/platform_data/pata_ixp4xx_cf.h b/include/linux/platform_data/pata_ixp4xx_cf.h
deleted file mode 100644
index e60fa41da4a5..000000000000
--- a/include/linux/platform_data/pata_ixp4xx_cf.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __PLATFORM_DATA_PATA_IXP4XX_H
-#define __PLATFORM_DATA_PATA_IXP4XX_H
-
-#include <linux/types.h>
-
-/*
- * This structure provide a means for the board setup code
- * to give information to th pata_ixp4xx driver. It is
- * passed as platform_data.
- */
-struct ixp4xx_pata_data {
- volatile u32 *cs0_cfg;
- volatile u32 *cs1_cfg;
- unsigned long cs0_bits;
- unsigned long cs1_bits;
- void __iomem *cmd;
- void __iomem *ctl;
-};
-
-#endif
--
2.31.1
Commit 6acaadc852f1 ("spi: clps711x: Driver refactor") removed the only use
of <linux/platform_data/spi-clps711x.h>, but left the header file behind.
This file is unused, delete it.
Cc: Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
Signed-off-by: Jonathan Corbet <[email protected]>
---
include/linux/platform_data/spi-clps711x.h | 17 -----------------
1 file changed, 17 deletions(-)
delete mode 100644 include/linux/platform_data/spi-clps711x.h
diff --git a/include/linux/platform_data/spi-clps711x.h b/include/linux/platform_data/spi-clps711x.h
deleted file mode 100644
index efaa596848c9..000000000000
--- a/include/linux/platform_data/spi-clps711x.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * CLPS711X SPI bus driver definitions
- *
- * Copyright (C) 2012 Alexander Shiyan <[email protected]>
- */
-
-#ifndef ____LINUX_PLATFORM_DATA_SPI_CLPS711X_H
-#define ____LINUX_PLATFORM_DATA_SPI_CLPS711X_H
-
-/* Board specific platform_data */
-struct spi_clps711x_pdata {
- int *chipselect; /* Array of GPIO-numbers */
- int num_chipselect; /* Total count of GPIOs */
-};
-
-#endif
--
2.31.1
Commit 72628da6d634 ("net: ks8851: Remove ks8851_mll.c") removed the only
use of <linux/ks8851_mll.h>, but left the header file in place. Nothing
uses that file, delete it now.
Cc: Marek Vasut <[email protected]>
Cc: David S. Miller <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
---
include/linux/ks8851_mll.h | 21 ---------------------
1 file changed, 21 deletions(-)
delete mode 100644 include/linux/ks8851_mll.h
diff --git a/include/linux/ks8851_mll.h b/include/linux/ks8851_mll.h
deleted file mode 100644
index 57c0a39ed796..000000000000
--- a/include/linux/ks8851_mll.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * ks8861_mll platform data struct definition
- * Copyright (c) 2012 BTicino S.p.A.
- */
-
-#ifndef _LINUX_KS8851_MLL_H
-#define _LINUX_KS8851_MLL_H
-
-#include <linux/if_ether.h>
-
-/**
- * struct ks8851_mll_platform_data - Platform data of the KS8851_MLL network driver
- * @macaddr: The MAC address of the device, set to all 0:s to use the on in
- * the chip.
- */
-struct ks8851_mll_platform_data {
- u8 mac_addr[ETH_ALEN];
-};
-
-#endif
--
2.31.1
Hi Jonathan,
Le mar., nov. 2 2021 at 16:01:55 -0600, Jonathan Corbet
<[email protected]> a ?crit :
> Commit ff71266aa490 ("mfd: Drop obsolete JZ4740 driver") removed the
> last
> file to include <linux/jz4740-adc.h> but left the header file itself
> behind. Nothing uses it, remove it now.
>
> Similarly, aea12071d6fc ("power/supply: Drop obsolete JZ4740 driver")
> deleted the last use of <linux/power/jz4740-battery.h>, so remove
> that one
> too.
>
> Cc: Paul Cercueil <[email protected]>
> Cc: Lee Jones <[email protected]>
> Cc: Paul Burton <[email protected]>
> Cc: Sebastian Reichel <[email protected]>
> Cc: [email protected]
> Signed-off-by: Jonathan Corbet <[email protected]>
Acked-by: Paul Cercueil <[email protected]>
Thanks!
-Paul
> ---
> include/linux/jz4740-adc.h | 33
> ----------------------------
> include/linux/power/jz4740-battery.h | 15 -------------
> 2 files changed, 48 deletions(-)
> delete mode 100644 include/linux/jz4740-adc.h
> delete mode 100644 include/linux/power/jz4740-battery.h
>
> diff --git a/include/linux/jz4740-adc.h b/include/linux/jz4740-adc.h
> deleted file mode 100644
> index 19d995c8bf06..000000000000
> --- a/include/linux/jz4740-adc.h
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -
> -#ifndef __LINUX_JZ4740_ADC
> -#define __LINUX_JZ4740_ADC
> -
> -struct device;
> -
> -/*
> - * jz4740_adc_set_config - Configure a JZ4740 adc device
> - * @dev: Pointer to a jz4740-adc device
> - * @mask: Mask for the config value to be set
> - * @val: Value to be set
> - *
> - * This function can be used by the JZ4740 ADC mfd cells to
> configure their
> - * options in the shared config register.
> -*/
> -int jz4740_adc_set_config(struct device *dev, uint32_t mask,
> uint32_t val);
> -
> -#define JZ_ADC_CONFIG_SPZZ BIT(31)
> -#define JZ_ADC_CONFIG_EX_IN BIT(30)
> -#define JZ_ADC_CONFIG_DNUM_MASK (0x7 << 16)
> -#define JZ_ADC_CONFIG_DMA_ENABLE BIT(15)
> -#define JZ_ADC_CONFIG_XYZ_MASK (0x2 << 13)
> -#define JZ_ADC_CONFIG_SAMPLE_NUM_MASK (0x7 << 10)
> -#define JZ_ADC_CONFIG_CLKDIV_MASK (0xf << 5)
> -#define JZ_ADC_CONFIG_BAT_MB BIT(4)
> -
> -#define JZ_ADC_CONFIG_DNUM(dnum) ((dnum) << 16)
> -#define JZ_ADC_CONFIG_XYZ_OFFSET(dnum) ((xyz) << 13)
> -#define JZ_ADC_CONFIG_SAMPLE_NUM(x) ((x) << 10)
> -#define JZ_ADC_CONFIG_CLKDIV(div) ((div) << 5)
> -
> -#endif
> diff --git a/include/linux/power/jz4740-battery.h
> b/include/linux/power/jz4740-battery.h
> deleted file mode 100644
> index 10da211678c8..000000000000
> --- a/include/linux/power/jz4740-battery.h
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-or-later */
> -/*
> - * Copyright (C) 2009, Jiejing Zhang <[email protected]>
> - */
> -
> -#ifndef __JZ4740_BATTERY_H
> -#define __JZ4740_BATTERY_H
> -
> -struct jz_battery_platform_data {
> - struct power_supply_info info;
> - int gpio_charge; /* GPIO port of Charger state */
> - int gpio_charge_active_low;
> -};
> -
> -#endif
> --
> 2.31.1
>
On Tue, Nov 2, 2021 at 11:01 PM Jonathan Corbet <[email protected]> wrote:
>
> Commit fb37409a01b0 ("arch: remove unicore32 port) deleted the last file
> that included <linux/cnt32_to_63.h>, but left that header file behind.
> Nothing uses it, delete it now.
>
> Cc: Nicolas Pitre <[email protected]>
> Cc: Mike Rapoport <[email protected]>
> Cc: Arnd Bergmann <[email protected]>
> Signed-off-by: Jonathan Corbet <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
On Tue, Nov 2, 2021 at 11:02 PM Jonathan Corbet <[email protected]> wrote:
>
> Commit 6acaadc852f1 ("spi: clps711x: Driver refactor") removed the only use
> of <linux/platform_data/spi-clps711x.h>, but left the header file behind.
> This file is unused, delete it.
>
> Cc: Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Signed-off-by: Mark Brown <[email protected]>
Aside from the misplaced Signed-off-by, the patch looks good
> Cc: [email protected]
> Signed-off-by: Jonathan Corbet <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
On Tue, Nov 2, 2021 at 11:02 PM Jonathan Corbet <[email protected]> wrote:
>
> Commit b00ced38e317 ("ARM: ixp4xx: Delete Avila boardfiles") removed the
> last use of <linux/platform_data/pata_ixp4xx_cf.h> but left the header file
> in place. Nothing uses this file, delete it now.
>
> Cc: Linus Walleij <[email protected]>
> Cc: Arnd Bergmann <[email protected]>
> Signed-off-by: Jonathan Corbet <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
On Tue, 2 Nov 2021, Jonathan Corbet wrote:
> Commit fb37409a01b0 ("arch: remove unicore32 port) deleted the last file
> that included <linux/cnt32_to_63.h>, but left that header file behind.
> Nothing uses it, delete it now.
>
> Cc: Nicolas Pitre <[email protected]>
> Cc: Mike Rapoport <[email protected]>
> Cc: Arnd Bergmann <[email protected]>
> Signed-off-by: Jonathan Corbet <[email protected]>
Acked-by: Nicolas Pitre <[email protected]>
> ---
> include/linux/cnt32_to_63.h | 104 ------------------------------------
> 1 file changed, 104 deletions(-)
> delete mode 100644 include/linux/cnt32_to_63.h
>
> diff --git a/include/linux/cnt32_to_63.h b/include/linux/cnt32_to_63.h
> deleted file mode 100644
> index 064428479f2d..000000000000
> --- a/include/linux/cnt32_to_63.h
> +++ /dev/null
> @@ -1,104 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-only */
> -/*
> - * Extend a 32-bit counter to 63 bits
> - *
> - * Author: Nicolas Pitre
> - * Created: December 3, 2006
> - * Copyright: MontaVista Software, Inc.
> - */
> -
> -#ifndef __LINUX_CNT32_TO_63_H__
> -#define __LINUX_CNT32_TO_63_H__
> -
> -#include <linux/compiler.h>
> -#include <linux/types.h>
> -#include <asm/byteorder.h>
> -
> -/* this is used only to give gcc a clue about good code generation */
> -union cnt32_to_63 {
> - struct {
> -#if defined(__LITTLE_ENDIAN)
> - u32 lo, hi;
> -#elif defined(__BIG_ENDIAN)
> - u32 hi, lo;
> -#endif
> - };
> - u64 val;
> -};
> -
> -
> -/**
> - * cnt32_to_63 - Expand a 32-bit counter to a 63-bit counter
> - * @cnt_lo: The low part of the counter
> - *
> - * Many hardware clock counters are only 32 bits wide and therefore have
> - * a relatively short period making wrap-arounds rather frequent. This
> - * is a problem when implementing sched_clock() for example, where a 64-bit
> - * non-wrapping monotonic value is expected to be returned.
> - *
> - * To overcome that limitation, let's extend a 32-bit counter to 63 bits
> - * in a completely lock free fashion. Bits 0 to 31 of the clock are provided
> - * by the hardware while bits 32 to 62 are stored in memory. The top bit in
> - * memory is used to synchronize with the hardware clock half-period. When
> - * the top bit of both counters (hardware and in memory) differ then the
> - * memory is updated with a new value, incrementing it when the hardware
> - * counter wraps around.
> - *
> - * Because a word store in memory is atomic then the incremented value will
> - * always be in synch with the top bit indicating to any potential concurrent
> - * reader if the value in memory is up to date or not with regards to the
> - * needed increment. And any race in updating the value in memory is harmless
> - * as the same value would simply be stored more than once.
> - *
> - * The restrictions for the algorithm to work properly are:
> - *
> - * 1) this code must be called at least once per each half period of the
> - * 32-bit counter;
> - *
> - * 2) this code must not be preempted for a duration longer than the
> - * 32-bit counter half period minus the longest period between two
> - * calls to this code;
> - *
> - * Those requirements ensure proper update to the state bit in memory.
> - * This is usually not a problem in practice, but if it is then a kernel
> - * timer should be scheduled to manage for this code to be executed often
> - * enough.
> - *
> - * And finally:
> - *
> - * 3) the cnt_lo argument must be seen as a globally incrementing value,
> - * meaning that it should be a direct reference to the counter data which
> - * can be evaluated according to a specific ordering within the macro,
> - * and not the result of a previous evaluation stored in a variable.
> - *
> - * For example, this is wrong:
> - *
> - * u32 partial = get_hw_count();
> - * u64 full = cnt32_to_63(partial);
> - * return full;
> - *
> - * This is fine:
> - *
> - * u64 full = cnt32_to_63(get_hw_count());
> - * return full;
> - *
> - * Note that the top bit (bit 63) in the returned value should be considered
> - * as garbage. It is not cleared here because callers are likely to use a
> - * multiplier on the returned value which can get rid of the top bit
> - * implicitly by making the multiplier even, therefore saving on a runtime
> - * clear-bit instruction. Otherwise caller must remember to clear the top
> - * bit explicitly.
> - */
> -#define cnt32_to_63(cnt_lo) \
> -({ \
> - static u32 __m_cnt_hi; \
> - union cnt32_to_63 __x; \
> - __x.hi = __m_cnt_hi; \
> - smp_rmb(); \
> - __x.lo = (cnt_lo); \
> - if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \
> - __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \
> - __x.val; \
> -})
> -
> -#endif
> --
> 2.31.1
>
>
On Tue, Nov 02, 2021 at 04:01:59PM -0600, Jonathan Corbet wrote:
> Commit 83b41248ed04 ("Input: cy8ctmg110_ts - switch to using gpiod API")
> remove the last use of <linux/input/cy8ctmg110_pdata.h> but left the header
> file behind. Nothing uses it now, delete it.
>
> Cc: Dmitry Torokhov <[email protected]>
> Signed-off-by: Jonathan Corbet <[email protected]>
Applied, thank you.
--
Dmitry
On Tue, Nov 02, 2021 at 04:01:57PM -0600, Jonathan Corbet wrote:
> Commit fb37409a01b0 ("arch: remove unicore32 port) deleted the last file
> that included <linux/cnt32_to_63.h>, but left that header file behind.
> Nothing uses it, delete it now.
>
> Cc: Nicolas Pitre <[email protected]>
> Cc: Mike Rapoport <[email protected]>
> Cc: Arnd Bergmann <[email protected]>
> Signed-off-by: Jonathan Corbet <[email protected]>
Acked-by: Mike Rapoport <[email protected]>
> ---
> include/linux/cnt32_to_63.h | 104 ------------------------------------
> 1 file changed, 104 deletions(-)
> delete mode 100644 include/linux/cnt32_to_63.h
>
> diff --git a/include/linux/cnt32_to_63.h b/include/linux/cnt32_to_63.h
> deleted file mode 100644
> index 064428479f2d..000000000000
> --- a/include/linux/cnt32_to_63.h
> +++ /dev/null
> @@ -1,104 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-only */
> -/*
> - * Extend a 32-bit counter to 63 bits
> - *
> - * Author: Nicolas Pitre
> - * Created: December 3, 2006
> - * Copyright: MontaVista Software, Inc.
> - */
> -
> -#ifndef __LINUX_CNT32_TO_63_H__
> -#define __LINUX_CNT32_TO_63_H__
> -
> -#include <linux/compiler.h>
> -#include <linux/types.h>
> -#include <asm/byteorder.h>
> -
> -/* this is used only to give gcc a clue about good code generation */
> -union cnt32_to_63 {
> - struct {
> -#if defined(__LITTLE_ENDIAN)
> - u32 lo, hi;
> -#elif defined(__BIG_ENDIAN)
> - u32 hi, lo;
> -#endif
> - };
> - u64 val;
> -};
> -
> -
> -/**
> - * cnt32_to_63 - Expand a 32-bit counter to a 63-bit counter
> - * @cnt_lo: The low part of the counter
> - *
> - * Many hardware clock counters are only 32 bits wide and therefore have
> - * a relatively short period making wrap-arounds rather frequent. This
> - * is a problem when implementing sched_clock() for example, where a 64-bit
> - * non-wrapping monotonic value is expected to be returned.
> - *
> - * To overcome that limitation, let's extend a 32-bit counter to 63 bits
> - * in a completely lock free fashion. Bits 0 to 31 of the clock are provided
> - * by the hardware while bits 32 to 62 are stored in memory. The top bit in
> - * memory is used to synchronize with the hardware clock half-period. When
> - * the top bit of both counters (hardware and in memory) differ then the
> - * memory is updated with a new value, incrementing it when the hardware
> - * counter wraps around.
> - *
> - * Because a word store in memory is atomic then the incremented value will
> - * always be in synch with the top bit indicating to any potential concurrent
> - * reader if the value in memory is up to date or not with regards to the
> - * needed increment. And any race in updating the value in memory is harmless
> - * as the same value would simply be stored more than once.
> - *
> - * The restrictions for the algorithm to work properly are:
> - *
> - * 1) this code must be called at least once per each half period of the
> - * 32-bit counter;
> - *
> - * 2) this code must not be preempted for a duration longer than the
> - * 32-bit counter half period minus the longest period between two
> - * calls to this code;
> - *
> - * Those requirements ensure proper update to the state bit in memory.
> - * This is usually not a problem in practice, but if it is then a kernel
> - * timer should be scheduled to manage for this code to be executed often
> - * enough.
> - *
> - * And finally:
> - *
> - * 3) the cnt_lo argument must be seen as a globally incrementing value,
> - * meaning that it should be a direct reference to the counter data which
> - * can be evaluated according to a specific ordering within the macro,
> - * and not the result of a previous evaluation stored in a variable.
> - *
> - * For example, this is wrong:
> - *
> - * u32 partial = get_hw_count();
> - * u64 full = cnt32_to_63(partial);
> - * return full;
> - *
> - * This is fine:
> - *
> - * u64 full = cnt32_to_63(get_hw_count());
> - * return full;
> - *
> - * Note that the top bit (bit 63) in the returned value should be considered
> - * as garbage. It is not cleared here because callers are likely to use a
> - * multiplier on the returned value which can get rid of the top bit
> - * implicitly by making the multiplier even, therefore saving on a runtime
> - * clear-bit instruction. Otherwise caller must remember to clear the top
> - * bit explicitly.
> - */
> -#define cnt32_to_63(cnt_lo) \
> -({ \
> - static u32 __m_cnt_hi; \
> - union cnt32_to_63 __x; \
> - __x.hi = __m_cnt_hi; \
> - smp_rmb(); \
> - __x.lo = (cnt_lo); \
> - if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \
> - __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \
> - __x.val; \
> -})
> -
> -#endif
> --
> 2.31.1
>
--
Sincerely yours,
Mike.
On Tue, 02 Nov 2021, Jonathan Corbet wrote:
> Commit ff71266aa490 ("mfd: Drop obsolete JZ4740 driver") removed the last
> file to include <linux/jz4740-adc.h> but left the header file itself
> behind. Nothing uses it, remove it now.
>
> Similarly, aea12071d6fc ("power/supply: Drop obsolete JZ4740 driver")
> deleted the last use of <linux/power/jz4740-battery.h>, so remove that one
> too.
>
> Cc: Paul Cercueil <[email protected]>
> Cc: Lee Jones <[email protected]>
> Cc: Paul Burton <[email protected]>
> Cc: Sebastian Reichel <[email protected]>
> Cc: [email protected]
> Signed-off-by: Jonathan Corbet <[email protected]>
> ---
> include/linux/jz4740-adc.h | 33 ----------------------------
> include/linux/power/jz4740-battery.h | 15 -------------
It appears as though there are still references to both of these
*devices* in the kernel tree. Should those be removed also?
> 2 files changed, 48 deletions(-)
> delete mode 100644 include/linux/jz4740-adc.h
> delete mode 100644 include/linux/power/jz4740-battery.h
Patch looks fine though.
Let me know if you want me to take it in via MFD. Otherwise:
Acked-by: Lee Jones <[email protected]>
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
> Commit 6a80b30086b8 ("fmc: Delete the FMC subsystem") removed the last user
> of <linux/sdb.h>, but left the header file behind. Nothing uses this file,
> delete it now.
Acked-by: Alessandro Rubini <[email protected]>
thanks
/alessandro
Hi Lee,
Le mer., nov. 3 2021 at 07:43:51 +0000, Lee Jones
<[email protected]> a écrit :
> On Tue, 02 Nov 2021, Jonathan Corbet wrote:
>
>> Commit ff71266aa490 ("mfd: Drop obsolete JZ4740 driver") removed
>> the last
>> file to include <linux/jz4740-adc.h> but left the header file itself
>> behind. Nothing uses it, remove it now.
>>
>> Similarly, aea12071d6fc ("power/supply: Drop obsolete JZ4740
>> driver")
>> deleted the last use of <linux/power/jz4740-battery.h>, so remove
>> that one
>> too.
>>
>> Cc: Paul Cercueil <[email protected]>
>> Cc: Lee Jones <[email protected]>
>> Cc: Paul Burton <[email protected]>
>> Cc: Sebastian Reichel <[email protected]>
>> Cc: [email protected]
>> Signed-off-by: Jonathan Corbet <[email protected]>
>> ---
>> include/linux/jz4740-adc.h | 33
>> ----------------------------
>> include/linux/power/jz4740-battery.h | 15 -------------
>
> It appears as though there are still references to both of these
> *devices* in the kernel tree. Should those be removed also?
These files were for older drivers that were since then replaced by
newer drivers; JZ47xx SoCs are still officially supported and
maintained.
Cheers,
-Paul
>> 2 files changed, 48 deletions(-)
>> delete mode 100644 include/linux/jz4740-adc.h
>> delete mode 100644 include/linux/power/jz4740-battery.h
>
> Patch looks fine though.
>
> Let me know if you want me to take it in via MFD. Otherwise:
>
> Acked-by: Lee Jones <[email protected]>
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog
On Wed, 03 Nov 2021, Paul Cercueil wrote:
> Hi Lee,
>
> Le mer., nov. 3 2021 at 07:43:51 +0000, Lee Jones <[email protected]> a
> écrit :
> > On Tue, 02 Nov 2021, Jonathan Corbet wrote:
> >
> > > Commit ff71266aa490 ("mfd: Drop obsolete JZ4740 driver") removed
> > > the last
> > > file to include <linux/jz4740-adc.h> but left the header file itself
> > > behind. Nothing uses it, remove it now.
> > >
> > > Similarly, aea12071d6fc ("power/supply: Drop obsolete JZ4740
> > > driver")
> > > deleted the last use of <linux/power/jz4740-battery.h>, so remove
> > > that one
> > > too.
> > >
> > > Cc: Paul Cercueil <[email protected]>
> > > Cc: Lee Jones <[email protected]>
> > > Cc: Paul Burton <[email protected]>
> > > Cc: Sebastian Reichel <[email protected]>
> > > Cc: [email protected]
> > > Signed-off-by: Jonathan Corbet <[email protected]>
> > > ---
> > > include/linux/jz4740-adc.h | 33
> > > ----------------------------
> > > include/linux/power/jz4740-battery.h | 15 -------------
> >
> > It appears as though there are still references to both of these
> > *devices* in the kernel tree. Should those be removed also?
>
> These files were for older drivers that were since then replaced by newer
> drivers; JZ47xx SoCs are still officially supported and maintained.
Okay, great.
Thanks for the explanation Paul.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Hi,
On Wed, Nov 03, 2021 at 07:43:51AM +0000, Lee Jones wrote:
> On Tue, 02 Nov 2021, Jonathan Corbet wrote:
> > Commit ff71266aa490 ("mfd: Drop obsolete JZ4740 driver") removed the last
> > file to include <linux/jz4740-adc.h> but left the header file itself
> > behind. Nothing uses it, remove it now.
> >
> > Similarly, aea12071d6fc ("power/supply: Drop obsolete JZ4740 driver")
> > deleted the last use of <linux/power/jz4740-battery.h>, so remove that one
> > too.
Thanks for the cleanup Jonathan.
> > Cc: Paul Cercueil <[email protected]>
> > Cc: Lee Jones <[email protected]>
> > Cc: Paul Burton <[email protected]>
> > Cc: Sebastian Reichel <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Jonathan Corbet <[email protected]>
> > ---
> > include/linux/jz4740-adc.h | 33 ----------------------------
> > include/linux/power/jz4740-battery.h | 15 -------------
>
> It appears as though there are still references to both of these
> *devices* in the kernel tree. Should those be removed also?
>
> > 2 files changed, 48 deletions(-)
> > delete mode 100644 include/linux/jz4740-adc.h
> > delete mode 100644 include/linux/power/jz4740-battery.h
>
> Patch looks fine though.
>
> Let me know if you want me to take it in via MFD. Otherwise:
>
> Acked-by: Lee Jones <[email protected]>
You can take it through MFD, no immutable branch needed.
Acked-by: Sebastian Reichel <[email protected]>
-- Sebastian
Trond Myklebust <[email protected]> writes:
> Hi Jon,
>
> On Tue, 2021-11-02 at 16:01 -0600, Jonathan Corbet wrote:
>> Commit 19fcae3d4f2dd ("scsi: remove the SCSI OSD library") deleted
>> the last
>> file that included <linux/pnfs_osd_xdr.h> but left that file behind.
>> It's
>> unused, get rid of it now.
>>
>> Cc: Christoph Hellwig <[email protected]>
>> Cc: Trond Myklebust <[email protected]>
>> Cc: Anna Schumaker <[email protected]>
>> Cc: [email protected]
>> Signed-off-by: Jonathan Corbet <[email protected]>
>
> Are you sending this directly to Linus or do you want me to take it
> through the NFS client tree? I'm fine either way.
Go ahead and take it, please, if that works; it's a bit off-topic for my
docs tree.
Thanks,
jon
On Wed, 03 Nov 2021, Sebastian Reichel wrote:
> Hi,
>
> On Wed, Nov 03, 2021 at 07:43:51AM +0000, Lee Jones wrote:
> > On Tue, 02 Nov 2021, Jonathan Corbet wrote:
> > > Commit ff71266aa490 ("mfd: Drop obsolete JZ4740 driver") removed the last
> > > file to include <linux/jz4740-adc.h> but left the header file itself
> > > behind. Nothing uses it, remove it now.
> > >
> > > Similarly, aea12071d6fc ("power/supply: Drop obsolete JZ4740 driver")
> > > deleted the last use of <linux/power/jz4740-battery.h>, so remove that one
> > > too.
>
> Thanks for the cleanup Jonathan.
>
> > > Cc: Paul Cercueil <[email protected]>
> > > Cc: Lee Jones <[email protected]>
> > > Cc: Paul Burton <[email protected]>
> > > Cc: Sebastian Reichel <[email protected]>
> > > Cc: [email protected]
> > > Signed-off-by: Jonathan Corbet <[email protected]>
> > > ---
> > > include/linux/jz4740-adc.h | 33 ----------------------------
> > > include/linux/power/jz4740-battery.h | 15 -------------
> >
> > It appears as though there are still references to both of these
> > *devices* in the kernel tree. Should those be removed also?
> >
> > > 2 files changed, 48 deletions(-)
> > > delete mode 100644 include/linux/jz4740-adc.h
> > > delete mode 100644 include/linux/power/jz4740-battery.h
> >
> > Patch looks fine though.
> >
> > Let me know if you want me to take it in via MFD. Otherwise:
> >
> > Acked-by: Lee Jones <[email protected]>
>
> You can take it through MFD, no immutable branch needed.
>
> Acked-by: Sebastian Reichel <[email protected]>
Okay, no problem.
Since the merge-window is already open, we'll aim for v5.17.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
On Tue, Nov 2, 2021 at 11:02 PM Jonathan Corbet <[email protected]> wrote:
> Commit 6a80b30086b8 ("fmc: Delete the FMC subsystem") removed the last user
> of <linux/sdb.h>, but left the header file behind. Nothing uses this file,
> delete it now.
>
> Cc: Linus Walleij <[email protected]>
> Cc: Alessandro Rubini <[email protected]>
> Signed-off-by: Jonathan Corbet <[email protected]>
Thanks Jon, I simply applied this for pin control fixes since
I feel responsible for cleaning this up.
Yours,
Linus Walleij
On Tue, Nov 2, 2021 at 11:02 PM Jonathan Corbet <[email protected]> wrote:
> Commit b00ced38e317 ("ARM: ixp4xx: Delete Avila boardfiles") removed the
> last use of <linux/platform_data/pata_ixp4xx_cf.h> but left the header file
> in place. Nothing uses this file, delete it now.
>
> Cc: Linus Walleij <[email protected]>
> Cc: Arnd Bergmann <[email protected]>
> Signed-off-by: Jonathan Corbet <[email protected]>
Patch applied to my IXP4xx tree!
Yours,
Linus Walleij
Hi Jon,
On Tue, 2021-11-02 at 16:01 -0600, Jonathan Corbet wrote:
> Commit 19fcae3d4f2dd ("scsi: remove the SCSI OSD library") deleted
> the last
> file that included <linux/pnfs_osd_xdr.h> but left that file behind.
> It's
> unused, get rid of it now.
>
> Cc: Christoph Hellwig <[email protected]>
> Cc: Trond Myklebust <[email protected]>
> Cc: Anna Schumaker <[email protected]>
> Cc: [email protected]
> Signed-off-by: Jonathan Corbet <[email protected]>
Are you sending this directly to Linus or do you want me to take it
through the NFS client tree? I'm fine either way.
>
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]
On Wed, 2021-11-03 at 07:38 -0600, Jonathan Corbet wrote:
> Trond Myklebust <[email protected]> writes:
>
> > Hi Jon,
> >
> > On Tue, 2021-11-02 at 16:01 -0600, Jonathan Corbet wrote:
> > > Commit 19fcae3d4f2dd ("scsi: remove the SCSI OSD library")
> > > deleted
> > > the last
> > > file that included <linux/pnfs_osd_xdr.h> but left that file
> > > behind.
> > > It's
> > > unused, get rid of it now.
> > >
> > > Cc: Christoph Hellwig <[email protected]>
> > > Cc: Trond Myklebust <[email protected]>
> > > Cc: Anna Schumaker <[email protected]>
> > > Cc: [email protected]
> > > Signed-off-by: Jonathan Corbet <[email protected]>
> >
> > Are you sending this directly to Linus or do you want me to take it
> > through the NFS client tree? I'm fine either way.
>
> Go ahead and take it, please, if that works; it's a bit off-topic for
> my
> docs tree.
>
Will do. Thanks, Jon!
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]
On Tue, 2 Nov 2021 16:01:54 -0600, Jonathan Corbet wrote:
> While working on something totally different, it occurred to me to wonder
> which header files in the kernel are not used anywhere. Writing a little
> program to figure that out in Rust was the perfect distriction from the
> work I really needed to be doing... It turns out there aren't many under
> include/linux; this gets rid of the ones I found.
>
> Jonathan Corbet (9):
> Remove unused headers <linux/jz4740-adc.h> and
> <linux/power/jz4740-battery.h>
> nfs: remove unused header <linux/pnfs_osd_xdr.h>
> Remove unused header <linux/cnt32_to_63.h>
> Remove unused header <linux/sdb.h>
> Input: remove unused header <linux/input/cy8ctmg110_pdata.h>
> mtd: remove unused header file <linux/mtd/latch-addr-flash.h>
> ARM: ixp4xx: remove unused header file pata_ixp4xx_cf.h
> spi: remove unused header file <linux/platform_data/spi-clps711x.h>
> net: remove unused header file <linux/ks8851_mll.h>
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[8/9] spi: remove unused header file <linux/platform_data/spi-clps711x.h>
commit: 45971bdd8ca8b5a99a49f4db86737401c45e246f
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
On Tue, 2021-11-02 at 22:02:00 UTC, Jonathan Corbet wrote:
> Commit d24dbd7541ff ("mtd: maps: Get rid of the latch-addr-flash driver")
> removed the last user of <linux/mtd/latch-addr-flash.h> but left the header
> file behind. Nothing uses this file, delete it now.
>
> Cc: Boris Brezillon <[email protected]>
> Cc: Miquel Raynal <[email protected]>
> Cc: Richard Weinberger <[email protected]>
> Cc: Vignesh Raghavendra <[email protected]>
> Cc: [email protected]
> Signed-off-by: Jonathan Corbet <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel