[PATCH v6 0/6] staging: kpc2000: another batch of fixes

Jeremy Sowden jeremy at azazel.net
Tue May 21 10:35:18 UTC 2019


There are a number relating to device attributes, one formatting patch,
and another that changes how card numbers are assigned.

Greg reckoned that the changes to the code in the attribute call-backs
that gets the struct kpc2000 object from the struct device object were
broken.  I've reviewed them and split them into two patches because I
was doing two different things in the previous patch.  I *think* they
are correct, but I've moved them to the end of the series in case I
really have just got the wrong end of the stick, so they can easily be
dropped.

Jeremy Sowden (6):
  staging: kpc2000: improved formatting of core.c.
  staging: kpc2000: added a helper to get struct kp2000_device from
    struct device.
  staging: kpc2000: added separate show functions for readable kp device
    attributes, defined them as read-only, and declared them static.
  staging: kpc2000: use IDA to assign card numbers.
  staging: kpc2000: simplified kp2000_device retrieval in device
    attribute call-backs.
  staging: kpc2000: removed superfluous NULL checks from device
    attribute call-backs.

 drivers/staging/kpc2000/TODO           |   1 -
 drivers/staging/kpc2000/kpc2000/core.c | 818 ++++++++++++++-----------
 2 files changed, 452 insertions(+), 367 deletions(-)

Since v5:

  * dropped two patches that Greg has applied;
  * rebased on to staging-testing.

Since v4:

  * rebased on to staging-next to pick up Greg's most recent changes.
  * made a few changes to some commit messages.
  * sent out the right versions of the patches.

Since v3:

  * added the formatting patch for core.c and folded the kp device
    attribute formatting fixes into it;
  * added the patch that introduces get_pcard();
  * added missing clean-up of IDA and reworded the commit message;
  * split the patch that simplified the retrieval of struct
    kp2000_device from struct dev in the show call-backs into two, and
    moved them to the end of the series.

Since v2:

  * dropped the white-space patch since Greg has applied it;
  * added a reported-by tag to patch that drops two attributes;
  * merged the patches that declared attributes static with the ones
    that split up the show call-backs;
  * moved the attribute definitions next to their call-backs;
  * moved the patch that fixed the card-number race to the end of the
  * series;
  * use an IDA to fix the card-number race, not an atomic_t.

Since v1:

  * merged the DEVICE_ATTR_RO patches with the ones that split up the
    show call-backs;
  * converted the show call-backs to use sprintf, instead of scnprintf.

-- 
2.20.1



More information about the devel mailing list