linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] Remove some unused header files
@ 2021-11-02 22:01 Jonathan Corbet
  2021-11-02 22:01 ` [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h> Jonathan Corbet
                   ` (10 more replies)
  0 siblings, 11 replies; 30+ messages in thread
From: Jonathan Corbet @ 2021-11-02 22:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jonathan Corbet

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


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h>
  2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
@ 2021-11-02 22:01 ` Jonathan Corbet
  2021-11-02 22:19   ` Paul Cercueil
  2021-11-03  7:43   ` Lee Jones
  2021-11-02 22:01 ` [PATCH 2/9] nfs: remove unused header <linux/pnfs_osd_xdr.h> Jonathan Corbet
                   ` (9 subsequent siblings)
  10 siblings, 2 replies; 30+ messages in thread
From: Jonathan Corbet @ 2021-11-02 22:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jonathan Corbet, Paul Cercueil, Lee Jones, Paul Burton,
	Sebastian Reichel, linux-pm

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 <paul@crapouillou.net>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 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 <kzjeef@gmail.com>
- */
-
-#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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 2/9] nfs: remove unused header <linux/pnfs_osd_xdr.h>
  2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
  2021-11-02 22:01 ` [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h> Jonathan Corbet
@ 2021-11-02 22:01 ` Jonathan Corbet
  2021-11-02 22:42   ` Trond Myklebust
  2021-11-02 22:01 ` [PATCH 3/9] Remove unused header <linux/cnt32_to_63.h> Jonathan Corbet
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 30+ messages in thread
From: Jonathan Corbet @ 2021-11-02 22:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jonathan Corbet, Christoph Hellwig, Trond Myklebust,
	Anna Schumaker, linux-nfs

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 <hch@lst.de>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>
Cc: linux-nfs@vger.kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 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 <bhalevy@panasas.com>
- *  Boaz Harrosh <ooo@electrozaur.com>
- *
- *  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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 3/9] Remove unused header <linux/cnt32_to_63.h>
  2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
  2021-11-02 22:01 ` [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h> Jonathan Corbet
  2021-11-02 22:01 ` [PATCH 2/9] nfs: remove unused header <linux/pnfs_osd_xdr.h> Jonathan Corbet
@ 2021-11-02 22:01 ` Jonathan Corbet
  2021-11-02 22:38   ` Arnd Bergmann
                     ` (2 more replies)
  2021-11-02 22:01 ` [PATCH 4/9] Remove unused header <linux/sdb.h> Jonathan Corbet
                   ` (7 subsequent siblings)
  10 siblings, 3 replies; 30+ messages in thread
From: Jonathan Corbet @ 2021-11-02 22:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jonathan Corbet, Nicolas Pitre, Mike Rapoport, Arnd Bergmann

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 <npitre@baylibre.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 4/9] Remove unused header <linux/sdb.h>
  2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
                   ` (2 preceding siblings ...)
  2021-11-02 22:01 ` [PATCH 3/9] Remove unused header <linux/cnt32_to_63.h> Jonathan Corbet
@ 2021-11-02 22:01 ` Jonathan Corbet
  2021-11-09 11:13   ` Linus Walleij
  2021-11-02 22:01 ` [PATCH 5/9] Input: remove unused header <linux/input/cy8ctmg110_pdata.h> Jonathan Corbet
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 30+ messages in thread
From: Jonathan Corbet @ 2021-11-02 22:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jonathan Corbet, Linus Walleij, Alessandro Rubini

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 <linus.walleij@linaro.org>
Cc: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 5/9] Input: remove unused header <linux/input/cy8ctmg110_pdata.h>
  2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
                   ` (3 preceding siblings ...)
  2021-11-02 22:01 ` [PATCH 4/9] Remove unused header <linux/sdb.h> Jonathan Corbet
@ 2021-11-02 22:01 ` Jonathan Corbet
  2021-11-02 23:47   ` Dmitry Torokhov
  2021-11-02 22:02 ` [PATCH 6/9] mtd: remove unused header file <linux/mtd/latch-addr-flash.h> Jonathan Corbet
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 30+ messages in thread
From: Jonathan Corbet @ 2021-11-02 22:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jonathan Corbet, Dmitry Torokhov

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 <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 6/9] mtd: remove unused header file <linux/mtd/latch-addr-flash.h>
  2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
                   ` (4 preceding siblings ...)
  2021-11-02 22:01 ` [PATCH 5/9] Input: remove unused header <linux/input/cy8ctmg110_pdata.h> Jonathan Corbet
@ 2021-11-02 22:02 ` Jonathan Corbet
  2021-11-19 18:35   ` Miquel Raynal
  2021-11-02 22:02 ` [PATCH 7/9] ARM: ixp4xx: remove unused header file pata_ixp4xx_cf.h Jonathan Corbet
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 30+ messages in thread
From: Jonathan Corbet @ 2021-11-02 22:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jonathan Corbet, Boris Brezillon, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, linux-mtd

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 <bbrezillon@kernel.org>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 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. <source@mvista.com>
- *
- * 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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 7/9] ARM: ixp4xx: remove unused header file pata_ixp4xx_cf.h
  2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
                   ` (5 preceding siblings ...)
  2021-11-02 22:02 ` [PATCH 6/9] mtd: remove unused header file <linux/mtd/latch-addr-flash.h> Jonathan Corbet
@ 2021-11-02 22:02 ` Jonathan Corbet
  2021-11-02 22:38   ` Arnd Bergmann
  2021-11-10  8:30   ` Linus Walleij
  2021-11-02 22:02 ` [PATCH 8/9] spi: remove unused header file <linux/platform_data/spi-clps711x.h> Jonathan Corbet
                   ` (3 subsequent siblings)
  10 siblings, 2 replies; 30+ messages in thread
From: Jonathan Corbet @ 2021-11-02 22:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jonathan Corbet, Linus Walleij, Arnd Bergmann

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 <linus.walleij@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 8/9] spi: remove unused header file <linux/platform_data/spi-clps711x.h>
  2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
                   ` (6 preceding siblings ...)
  2021-11-02 22:02 ` [PATCH 7/9] ARM: ixp4xx: remove unused header file pata_ixp4xx_cf.h Jonathan Corbet
@ 2021-11-02 22:02 ` Jonathan Corbet
  2021-11-02 22:37   ` Arnd Bergmann
  2021-11-02 22:02 ` [PATCH 9/9] net: remove unused header file <linux/ks8851_mll.h> Jonathan Corbet
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 30+ messages in thread
From: Jonathan Corbet @ 2021-11-02 22:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jonathan Corbet, Signed-off-by : Arnd Bergmann,
	Signed-off-by : Mark Brown, linux-arm-kernel

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 <arnd@arndb.de>
Cc: Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 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 <shc_work@mail.ru>
- */
-
-#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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 9/9] net: remove unused header file <linux/ks8851_mll.h>
  2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
                   ` (7 preceding siblings ...)
  2021-11-02 22:02 ` [PATCH 8/9] spi: remove unused header file <linux/platform_data/spi-clps711x.h> Jonathan Corbet
@ 2021-11-02 22:02 ` Jonathan Corbet
  2021-11-03  8:43 ` [PATCH 4/9] Remove unused header <linux/sdb.h> Alessandro Rubini
  2021-11-15 19:21 ` (subset) [PATCH 0/9] Remove some unused header files Mark Brown
  10 siblings, 0 replies; 30+ messages in thread
From: Jonathan Corbet @ 2021-11-02 22:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jonathan Corbet, Marek Vasut, David S . Miller

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 <marex@denx.de>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h>
  2021-11-02 22:01 ` [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h> Jonathan Corbet
@ 2021-11-02 22:19   ` Paul Cercueil
  2021-11-03  7:43   ` Lee Jones
  1 sibling, 0 replies; 30+ messages in thread
From: Paul Cercueil @ 2021-11-02 22:19 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: linux-kernel, Lee Jones, Paul Burton, Sebastian Reichel, linux-pm

Hi Jonathan,

Le mar., nov. 2 2021 at 16:01:55 -0600, Jonathan Corbet 
<corbet@lwn.net> 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 <paul@crapouillou.net>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Paul Burton <paul.burton@mips.com>
> Cc: Sebastian Reichel <sre@kernel.org>
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Acked-by: Paul Cercueil <paul@crapouillou.net>

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 <kzjeef@gmail.com>
> - */
> -
> -#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
> 



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 8/9] spi: remove unused header file <linux/platform_data/spi-clps711x.h>
  2021-11-02 22:02 ` [PATCH 8/9] spi: remove unused header file <linux/platform_data/spi-clps711x.h> Jonathan Corbet
@ 2021-11-02 22:37   ` Arnd Bergmann
  0 siblings, 0 replies; 30+ messages in thread
From: Arnd Bergmann @ 2021-11-02 22:37 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Linux Kernel Mailing List, Signed-off-by : Arnd Bergmann,
	Signed-off-by : Mark Brown, Linux ARM

On Tue, Nov 2, 2021 at 11:02 PM Jonathan Corbet <corbet@lwn.net> 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 <arnd@arndb.de>
> Cc: Signed-off-by: Mark Brown <broonie@kernel.org>

Aside from the misplaced Signed-off-by, the patch looks good

> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 7/9] ARM: ixp4xx: remove unused header file pata_ixp4xx_cf.h
  2021-11-02 22:02 ` [PATCH 7/9] ARM: ixp4xx: remove unused header file pata_ixp4xx_cf.h Jonathan Corbet
@ 2021-11-02 22:38   ` Arnd Bergmann
  2021-11-10  8:30   ` Linus Walleij
  1 sibling, 0 replies; 30+ messages in thread
From: Arnd Bergmann @ 2021-11-02 22:38 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: Linux Kernel Mailing List, Linus Walleij, Arnd Bergmann

On Tue, Nov 2, 2021 at 11:02 PM Jonathan Corbet <corbet@lwn.net> 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 <linus.walleij@linaro.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 3/9] Remove unused header <linux/cnt32_to_63.h>
  2021-11-02 22:01 ` [PATCH 3/9] Remove unused header <linux/cnt32_to_63.h> Jonathan Corbet
@ 2021-11-02 22:38   ` Arnd Bergmann
  2021-11-02 23:16   ` Nicolas Pitre
  2021-11-03  6:31   ` Mike Rapoport
  2 siblings, 0 replies; 30+ messages in thread
From: Arnd Bergmann @ 2021-11-02 22:38 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Linux Kernel Mailing List, Nicolas Pitre, Mike Rapoport, Arnd Bergmann

On Tue, Nov 2, 2021 at 11:01 PM Jonathan Corbet <corbet@lwn.net> 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 <npitre@baylibre.com>
> Cc: Mike Rapoport <rppt@kernel.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 2/9] nfs: remove unused header <linux/pnfs_osd_xdr.h>
  2021-11-02 22:01 ` [PATCH 2/9] nfs: remove unused header <linux/pnfs_osd_xdr.h> Jonathan Corbet
@ 2021-11-02 22:42   ` Trond Myklebust
  2021-11-03 13:38     ` Jonathan Corbet
  0 siblings, 1 reply; 30+ messages in thread
From: Trond Myklebust @ 2021-11-02 22:42 UTC (permalink / raw)
  To: corbet, linux-kernel; +Cc: hch, linux-nfs, anna.schumaker

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 <hch@lst.de>
> Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
> Cc: Anna Schumaker <anna.schumaker@netapp.com>
> Cc: linux-nfs@vger.kernel.org
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

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
trond.myklebust@hammerspace.com



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 3/9] Remove unused header <linux/cnt32_to_63.h>
  2021-11-02 22:01 ` [PATCH 3/9] Remove unused header <linux/cnt32_to_63.h> Jonathan Corbet
  2021-11-02 22:38   ` Arnd Bergmann
@ 2021-11-02 23:16   ` Nicolas Pitre
  2021-11-03  6:31   ` Mike Rapoport
  2 siblings, 0 replies; 30+ messages in thread
From: Nicolas Pitre @ 2021-11-02 23:16 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-kernel, Mike Rapoport, Arnd Bergmann

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 <npitre@baylibre.com>
> Cc: Mike Rapoport <rppt@kernel.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Acked-by: Nicolas Pitre <nico@fluxnic.net>

> ---
>  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
> 
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 5/9] Input: remove unused header <linux/input/cy8ctmg110_pdata.h>
  2021-11-02 22:01 ` [PATCH 5/9] Input: remove unused header <linux/input/cy8ctmg110_pdata.h> Jonathan Corbet
@ 2021-11-02 23:47   ` Dmitry Torokhov
  0 siblings, 0 replies; 30+ messages in thread
From: Dmitry Torokhov @ 2021-11-02 23:47 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-kernel

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 <dmitry.torokhov@gmail.com>
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 3/9] Remove unused header <linux/cnt32_to_63.h>
  2021-11-02 22:01 ` [PATCH 3/9] Remove unused header <linux/cnt32_to_63.h> Jonathan Corbet
  2021-11-02 22:38   ` Arnd Bergmann
  2021-11-02 23:16   ` Nicolas Pitre
@ 2021-11-03  6:31   ` Mike Rapoport
  2 siblings, 0 replies; 30+ messages in thread
From: Mike Rapoport @ 2021-11-03  6:31 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-kernel, Nicolas Pitre, Arnd Bergmann

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 <npitre@baylibre.com>
> Cc: Mike Rapoport <rppt@kernel.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Acked-by: Mike Rapoport <rppt@linux.ibm.com>

> ---
>  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.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h>
  2021-11-02 22:01 ` [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h> Jonathan Corbet
  2021-11-02 22:19   ` Paul Cercueil
@ 2021-11-03  7:43   ` Lee Jones
  2021-11-03  9:27     ` Paul Cercueil
  2021-11-03 12:40     ` Sebastian Reichel
  1 sibling, 2 replies; 30+ messages in thread
From: Lee Jones @ 2021-11-03  7:43 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: linux-kernel, Paul Cercueil, Paul Burton, Sebastian Reichel, linux-pm

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 <paul@crapouillou.net>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Paul Burton <paul.burton@mips.com>
> Cc: Sebastian Reichel <sre@kernel.org>
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
> ---
>  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 <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 4/9] Remove unused header <linux/sdb.h>
  2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
                   ` (8 preceding siblings ...)
  2021-11-02 22:02 ` [PATCH 9/9] net: remove unused header file <linux/ks8851_mll.h> Jonathan Corbet
@ 2021-11-03  8:43 ` Alessandro Rubini
  2021-11-15 19:21 ` (subset) [PATCH 0/9] Remove some unused header files Mark Brown
  10 siblings, 0 replies; 30+ messages in thread
From: Alessandro Rubini @ 2021-11-03  8:43 UTC (permalink / raw)
  To: corbet; +Cc: linux-kernel, linus.walleij

> 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 <rubini@gnudd.com>

thanks
/alessandro

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h>
  2021-11-03  7:43   ` Lee Jones
@ 2021-11-03  9:27     ` Paul Cercueil
  2021-11-03 10:13       ` Lee Jones
  2021-11-03 12:40     ` Sebastian Reichel
  1 sibling, 1 reply; 30+ messages in thread
From: Paul Cercueil @ 2021-11-03  9:27 UTC (permalink / raw)
  To: Lee Jones
  Cc: Jonathan Corbet, linux-kernel, Paul Burton, Sebastian Reichel, linux-pm

Hi Lee,

Le mer., nov. 3 2021 at 07:43:51 +0000, Lee Jones 
<lee.jones@linaro.org> 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 <paul@crapouillou.net>
>>  Cc: Lee Jones <lee.jones@linaro.org>
>>  Cc: Paul Burton <paul.burton@mips.com>
>>  Cc: Sebastian Reichel <sre@kernel.org>
>>  Cc: linux-pm@vger.kernel.org
>>  Signed-off-by: Jonathan Corbet <corbet@lwn.net>
>>  ---
>>   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 <lee.jones@linaro.org>
> 
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h>
  2021-11-03  9:27     ` Paul Cercueil
@ 2021-11-03 10:13       ` Lee Jones
  0 siblings, 0 replies; 30+ messages in thread
From: Lee Jones @ 2021-11-03 10:13 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Jonathan Corbet, linux-kernel, Paul Burton, Sebastian Reichel, linux-pm

On Wed, 03 Nov 2021, Paul Cercueil wrote:

> Hi Lee,
> 
> Le mer., nov. 3 2021 at 07:43:51 +0000, Lee Jones <lee.jones@linaro.org> 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 <paul@crapouillou.net>
> > >  Cc: Lee Jones <lee.jones@linaro.org>
> > >  Cc: Paul Burton <paul.burton@mips.com>
> > >  Cc: Sebastian Reichel <sre@kernel.org>
> > >  Cc: linux-pm@vger.kernel.org
> > >  Signed-off-by: Jonathan Corbet <corbet@lwn.net>
> > >  ---
> > >   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

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h>
  2021-11-03  7:43   ` Lee Jones
  2021-11-03  9:27     ` Paul Cercueil
@ 2021-11-03 12:40     ` Sebastian Reichel
  2021-11-04  8:30       ` Lee Jones
  1 sibling, 1 reply; 30+ messages in thread
From: Sebastian Reichel @ 2021-11-03 12:40 UTC (permalink / raw)
  To: Lee Jones
  Cc: Jonathan Corbet, linux-kernel, Paul Cercueil, Paul Burton, linux-pm

[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]

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 <paul@crapouillou.net>
> > Cc: Lee Jones <lee.jones@linaro.org>
> > Cc: Paul Burton <paul.burton@mips.com>
> > Cc: Sebastian Reichel <sre@kernel.org>
> > Cc: linux-pm@vger.kernel.org
> > Signed-off-by: Jonathan Corbet <corbet@lwn.net>
> > ---
> >  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 <lee.jones@linaro.org>

You can take it through MFD, no immutable branch needed.

Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 2/9] nfs: remove unused header <linux/pnfs_osd_xdr.h>
  2021-11-02 22:42   ` Trond Myklebust
@ 2021-11-03 13:38     ` Jonathan Corbet
  2021-11-03 13:54       ` Trond Myklebust
  0 siblings, 1 reply; 30+ messages in thread
From: Jonathan Corbet @ 2021-11-03 13:38 UTC (permalink / raw)
  To: Trond Myklebust, linux-kernel; +Cc: hch, linux-nfs, anna.schumaker

Trond Myklebust <trondmy@hammerspace.com> 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 <hch@lst.de>
>> Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
>> Cc: Anna Schumaker <anna.schumaker@netapp.com>
>> Cc: linux-nfs@vger.kernel.org
>> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
>
> 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

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 2/9] nfs: remove unused header <linux/pnfs_osd_xdr.h>
  2021-11-03 13:38     ` Jonathan Corbet
@ 2021-11-03 13:54       ` Trond Myklebust
  0 siblings, 0 replies; 30+ messages in thread
From: Trond Myklebust @ 2021-11-03 13:54 UTC (permalink / raw)
  To: corbet, linux-kernel; +Cc: hch, linux-nfs, anna.schumaker

On Wed, 2021-11-03 at 07:38 -0600, Jonathan Corbet wrote:
> Trond Myklebust <trondmy@hammerspace.com> 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 <hch@lst.de>
> > > Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
> > > Cc: Anna Schumaker <anna.schumaker@netapp.com>
> > > Cc: linux-nfs@vger.kernel.org
> > > Signed-off-by: Jonathan Corbet <corbet@lwn.net>
> > 
> > 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
trond.myklebust@hammerspace.com



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h>
  2021-11-03 12:40     ` Sebastian Reichel
@ 2021-11-04  8:30       ` Lee Jones
  0 siblings, 0 replies; 30+ messages in thread
From: Lee Jones @ 2021-11-04  8:30 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Jonathan Corbet, linux-kernel, Paul Cercueil, Paul Burton, linux-pm

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 <paul@crapouillou.net>
> > > Cc: Lee Jones <lee.jones@linaro.org>
> > > Cc: Paul Burton <paul.burton@mips.com>
> > > Cc: Sebastian Reichel <sre@kernel.org>
> > > Cc: linux-pm@vger.kernel.org
> > > Signed-off-by: Jonathan Corbet <corbet@lwn.net>
> > > ---
> > >  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 <lee.jones@linaro.org>
> 
> You can take it through MFD, no immutable branch needed.
> 
> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>

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

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 4/9] Remove unused header <linux/sdb.h>
  2021-11-02 22:01 ` [PATCH 4/9] Remove unused header <linux/sdb.h> Jonathan Corbet
@ 2021-11-09 11:13   ` Linus Walleij
  0 siblings, 0 replies; 30+ messages in thread
From: Linus Walleij @ 2021-11-09 11:13 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-kernel, Alessandro Rubini

On Tue, Nov 2, 2021 at 11:02 PM Jonathan Corbet <corbet@lwn.net> 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 <linus.walleij@linaro.org>
> Cc: Alessandro Rubini <rubini@gnudd.com>
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Thanks Jon, I simply applied this for pin control fixes since
I feel responsible for cleaning this up.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 7/9] ARM: ixp4xx: remove unused header file pata_ixp4xx_cf.h
  2021-11-02 22:02 ` [PATCH 7/9] ARM: ixp4xx: remove unused header file pata_ixp4xx_cf.h Jonathan Corbet
  2021-11-02 22:38   ` Arnd Bergmann
@ 2021-11-10  8:30   ` Linus Walleij
  1 sibling, 0 replies; 30+ messages in thread
From: Linus Walleij @ 2021-11-10  8:30 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-kernel, Arnd Bergmann

On Tue, Nov 2, 2021 at 11:02 PM Jonathan Corbet <corbet@lwn.net> 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 <linus.walleij@linaro.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Patch applied to my IXP4xx tree!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: (subset) [PATCH 0/9] Remove some unused header files
  2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
                   ` (9 preceding siblings ...)
  2021-11-03  8:43 ` [PATCH 4/9] Remove unused header <linux/sdb.h> Alessandro Rubini
@ 2021-11-15 19:21 ` Mark Brown
  10 siblings, 0 replies; 30+ messages in thread
From: Mark Brown @ 2021-11-15 19:21 UTC (permalink / raw)
  To: Jonathan Corbet, linux-kernel

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

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 6/9] mtd: remove unused header file <linux/mtd/latch-addr-flash.h>
  2021-11-02 22:02 ` [PATCH 6/9] mtd: remove unused header file <linux/mtd/latch-addr-flash.h> Jonathan Corbet
@ 2021-11-19 18:35   ` Miquel Raynal
  0 siblings, 0 replies; 30+ messages in thread
From: Miquel Raynal @ 2021-11-19 18:35 UTC (permalink / raw)
  To: Jonathan Corbet, linux-kernel
  Cc: Miquel Raynal, Boris Brezillon, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd

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 <bbrezillon@kernel.org>
> Cc: Miquel Raynal <miquel.raynal@bootlin.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: Vignesh Raghavendra <vigneshr@ti.com>
> Cc: linux-mtd@lists.infradead.org
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2021-11-19 18:35 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 22:01 [PATCH 0/9] Remove some unused header files Jonathan Corbet
2021-11-02 22:01 ` [PATCH 1/9] Remove unused headers <linux/jz4740-adc.h> and <linux/power/jz4740-battery.h> Jonathan Corbet
2021-11-02 22:19   ` Paul Cercueil
2021-11-03  7:43   ` Lee Jones
2021-11-03  9:27     ` Paul Cercueil
2021-11-03 10:13       ` Lee Jones
2021-11-03 12:40     ` Sebastian Reichel
2021-11-04  8:30       ` Lee Jones
2021-11-02 22:01 ` [PATCH 2/9] nfs: remove unused header <linux/pnfs_osd_xdr.h> Jonathan Corbet
2021-11-02 22:42   ` Trond Myklebust
2021-11-03 13:38     ` Jonathan Corbet
2021-11-03 13:54       ` Trond Myklebust
2021-11-02 22:01 ` [PATCH 3/9] Remove unused header <linux/cnt32_to_63.h> Jonathan Corbet
2021-11-02 22:38   ` Arnd Bergmann
2021-11-02 23:16   ` Nicolas Pitre
2021-11-03  6:31   ` Mike Rapoport
2021-11-02 22:01 ` [PATCH 4/9] Remove unused header <linux/sdb.h> Jonathan Corbet
2021-11-09 11:13   ` Linus Walleij
2021-11-02 22:01 ` [PATCH 5/9] Input: remove unused header <linux/input/cy8ctmg110_pdata.h> Jonathan Corbet
2021-11-02 23:47   ` Dmitry Torokhov
2021-11-02 22:02 ` [PATCH 6/9] mtd: remove unused header file <linux/mtd/latch-addr-flash.h> Jonathan Corbet
2021-11-19 18:35   ` Miquel Raynal
2021-11-02 22:02 ` [PATCH 7/9] ARM: ixp4xx: remove unused header file pata_ixp4xx_cf.h Jonathan Corbet
2021-11-02 22:38   ` Arnd Bergmann
2021-11-10  8:30   ` Linus Walleij
2021-11-02 22:02 ` [PATCH 8/9] spi: remove unused header file <linux/platform_data/spi-clps711x.h> Jonathan Corbet
2021-11-02 22:37   ` Arnd Bergmann
2021-11-02 22:02 ` [PATCH 9/9] net: remove unused header file <linux/ks8851_mll.h> Jonathan Corbet
2021-11-03  8:43 ` [PATCH 4/9] Remove unused header <linux/sdb.h> Alessandro Rubini
2021-11-15 19:21 ` (subset) [PATCH 0/9] Remove some unused header files Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).