mbox series

[00/10] Cleanup of old code

Message ID 20181025062131.18873-1-alistair@popple.id.au
Headers show
Series Cleanup of old code | expand

Message

Alistair Popple Oct. 25, 2018, 6:21 a.m. UTC
Most of the device-tree parsing code was originally taken from
Skiboot. Only some of it turned out to be useful for pdbg which
resulted in a lot of dead code which this patch series removes.

It has also resulted in a lot of functions being made global. Some
code restructuring allows most functions to be declared static making
it more obvious which ones are core library functions and which are
for internal use only.

Alistair Popple (10):
  libpdbg: Remove unused code
  libpdbg: Make more declarations static
  libpdbg: Move property code into libpdbg/device.c
  libpdbg: Rename property functions
  libpdbg: Rework chip-id functions
  libpdbg: Rework target addressing
  libpdbg: Remove old dt_prop functions
  libpdbg: Rework target compatible
  libpdbg: Make dt_root private
  libpdbg: Remove device.h

 Makefile.am       |   1 -
 libpdbg/bmcfsi.c  |  38 +++--
 libpdbg/cfam.c    |   6 +-
 libpdbg/device.c  | 463 +++++++++++++-----------------------------------------
 libpdbg/device.h  | 228 ---------------------------
 libpdbg/host.c    |   2 +-
 libpdbg/htm.c     |  12 +-
 libpdbg/i2c.c     |   7 +-
 libpdbg/libpdbg.c |  97 ++++--------
 libpdbg/libpdbg.h |  33 +++-
 libpdbg/p8chip.c  |   6 +-
 libpdbg/p9chip.c  |   6 +-
 libpdbg/target.c  |  18 +--
 libpdbg/target.h  |   1 -
 libpdbg/xbus.c    |   2 +-
 src/htm.c         |   1 -
 src/main.c        |   4 +-
 17 files changed, 217 insertions(+), 708 deletions(-)
 delete mode 100644 libpdbg/device.h

--
2.11.0

Comments

Amitay Isaacs Nov. 5, 2018, 12:33 a.m. UTC | #1
On Thu, 2018-10-25 at 17:21 +1100, Alistair Popple wrote:
> Most of the device-tree parsing code was originally taken from
> Skiboot. Only some of it turned out to be useful for pdbg which
> resulted in a lot of dead code which this patch series removes.
> 
> It has also resulted in a lot of functions being made global. Some
> code restructuring allows most functions to be declared static making
> it more obvious which ones are core library functions and which are
> for internal use only.

The series does not apply to master anymore.  Can you re-post?
It's easier to review the patches in tree.

> 
> Alistair Popple (10):
>   libpdbg: Remove unused code
>   libpdbg: Make more declarations static
>   libpdbg: Move property code into libpdbg/device.c
>   libpdbg: Rename property functions
>   libpdbg: Rework chip-id functions
>   libpdbg: Rework target addressing
>   libpdbg: Remove old dt_prop functions
>   libpdbg: Rework target compatible
>   libpdbg: Make dt_root private
>   libpdbg: Remove device.h
> 
>  Makefile.am       |   1 -
>  libpdbg/bmcfsi.c  |  38 +++--
>  libpdbg/cfam.c    |   6 +-
>  libpdbg/device.c  | 463 +++++++++++++-------------------------------
> ----------
>  libpdbg/device.h  | 228 ---------------------------
>  libpdbg/host.c    |   2 +-
>  libpdbg/htm.c     |  12 +-
>  libpdbg/i2c.c     |   7 +-
>  libpdbg/libpdbg.c |  97 ++++--------
>  libpdbg/libpdbg.h |  33 +++-
>  libpdbg/p8chip.c  |   6 +-
>  libpdbg/p9chip.c  |   6 +-
>  libpdbg/target.c  |  18 +--
>  libpdbg/target.h  |   1 -
>  libpdbg/xbus.c    |   2 +-
>  src/htm.c         |   1 -
>  src/main.c        |   4 +-
>  17 files changed, 217 insertions(+), 708 deletions(-)
>  delete mode 100644 libpdbg/device.h
> 
> --
> 2.11.0

Amitay.
Alistair Popple Nov. 6, 2018, 2:24 a.m. UTC | #2
On Monday, 5 November 2018 11:33:07 AM AEDT Amitay Isaacs wrote:
> On Thu, 2018-10-25 at 17:21 +1100, Alistair Popple wrote:
> > Most of the device-tree parsing code was originally taken from
> > Skiboot. Only some of it turned out to be useful for pdbg which
> > resulted in a lot of dead code which this patch series removes.
> > 
> > It has also resulted in a lot of functions being made global. Some
> > code restructuring allows most functions to be declared static making
> > it more obvious which ones are core library functions and which are
> > for internal use only.
> 
> The series does not apply to master anymore.  Can you re-post?
> It's easier to review the patches in tree.

Sure thing. Thanks for taking a look.

- Alistair
 
> > Alistair Popple (10):
> >   libpdbg: Remove unused code
> >   libpdbg: Make more declarations static
> >   libpdbg: Move property code into libpdbg/device.c
> >   libpdbg: Rename property functions
> >   libpdbg: Rework chip-id functions
> >   libpdbg: Rework target addressing
> >   libpdbg: Remove old dt_prop functions
> >   libpdbg: Rework target compatible
> >   libpdbg: Make dt_root private
> >   libpdbg: Remove device.h
> >  
> >  Makefile.am       |   1 -
> >  libpdbg/bmcfsi.c  |  38 +++--
> >  libpdbg/cfam.c    |   6 +-
> >  libpdbg/device.c  | 463 +++++++++++++-------------------------------
> > 
> > ----------
> > 
> >  libpdbg/device.h  | 228 ---------------------------
> >  libpdbg/host.c    |   2 +-
> >  libpdbg/htm.c     |  12 +-
> >  libpdbg/i2c.c     |   7 +-
> >  libpdbg/libpdbg.c |  97 ++++--------
> >  libpdbg/libpdbg.h |  33 +++-
> >  libpdbg/p8chip.c  |   6 +-
> >  libpdbg/p9chip.c  |   6 +-
> >  libpdbg/target.c  |  18 +--
> >  libpdbg/target.h  |   1 -
> >  libpdbg/xbus.c    |   2 +-
> >  src/htm.c         |   1 -
> >  src/main.c        |   4 +-
> >  17 files changed, 217 insertions(+), 708 deletions(-)
> >  delete mode 100644 libpdbg/device.h
> > 
> > --
> > 2.11.0
> 
> Amitay.