Skip to content

PTP attribute handling cleanup

Dmitry Torokhov lkml netdev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 4 repliesIn review
  2. v14 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- added Richard's acked-by to patch #1
- removed use of kmalloc_array in favor of kcalloc in patch #2 at Richard's request
- added a cover letter

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ptp: do not explicitly set drvdata in ptp_clock_register()drivers/ptp/ptp_clock.c+0 -20 replies
2/4ptp: use kcalloc when allocating arraysdrivers/ptp/ptp_sysfs.c+2 -30 replies
3/4ptp: use is_visible method to hide unused attributesdrivers/ptp/ptp_sysfs.c+55 -700 replies
4/4ptp: create "pins" together with the rest of attributesdrivers/ptp/ptp_clock.c drivers/ptp/ptp_private.h drivers/ptp/ptp_sysfs.c+24 -420 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRichard Cochran
SeriesA-b
1/4A-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] PTP attribute handling cleanup

PTP core was creating some attributes, such as "period" and "fifo", and the entire "pins" attribute group, after creating class deevice, which creates a race for userspace: uevent may arrive before all attributes are created.

This series of patches switches PTP to use is_visible() to control visibility of attributes in a group, and device_create_with_groups() to ensure that attributes are created before we notify userspace of a new device.

v2:
- added Richard's acked-by to patch #1
- removed use of kmalloc_array in favor of kcalloc in patch #2 at Richard's request
- added a cover letter

v1:
- initial patch set

Dmitry Torokhov (4):
ptp: do not explicitly set drvdata in ptp_clock_register()
ptp: use kcalloc when allocating arrays
ptp: use is_visible method to hide unused attributes
ptp: create "pins" together with the rest of attributes

 drivers/ptp/ptp_clock.c   |  22 +++---
 drivers/ptp/ptp_private.h |   7 +-
 drivers/ptp/ptp_sysfs.c   | 167 ++++++++++++++++++----------------------------
 3 files changed, 80 insertions(+), 116 deletions(-)

Thanks.

Signature · 1 line
Dmitry