* [PATCH 1/2] sysfs: constify sysfs create/remove files harder
@ 2018-10-04 14:37 ` Jani Nikula
0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2018-10-04 14:37 UTC (permalink / raw)
To: linux-kernel, intel-gfx
Cc: jani.nikula, Greg Kroah-Hartman, Rafael J. Wysocki
Let the passed in array be const (and thus placed in rodata) instead of
a mutable array of const pointers.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
fs/sysfs/file.c | 4 ++--
include/linux/sysfs.h | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 0a7252aecfa5..bb71db63c99c 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -334,7 +334,7 @@ int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr,
}
EXPORT_SYMBOL_GPL(sysfs_create_file_ns);
-int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr)
+int sysfs_create_files(struct kobject *kobj, const struct attribute * const *ptr)
{
int err = 0;
int i;
@@ -493,7 +493,7 @@ bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr)
return ret;
}
-void sysfs_remove_files(struct kobject *kobj, const struct attribute **ptr)
+void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *ptr)
{
int i;
for (i = 0; ptr[i]; i++)
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 987cefa337de..786816cf4aa5 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -234,7 +234,7 @@ int __must_check sysfs_create_file_ns(struct kobject *kobj,
const struct attribute *attr,
const void *ns);
int __must_check sysfs_create_files(struct kobject *kobj,
- const struct attribute **attr);
+ const struct attribute * const *attr);
int __must_check sysfs_chmod_file(struct kobject *kobj,
const struct attribute *attr, umode_t mode);
struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj,
@@ -243,7 +243,7 @@ void sysfs_unbreak_active_protection(struct kernfs_node *kn);
void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr,
const void *ns);
bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr);
-void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr);
+void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *attr);
int __must_check sysfs_create_bin_file(struct kobject *kobj,
const struct bin_attribute *attr);
@@ -342,7 +342,7 @@ static inline int sysfs_create_file_ns(struct kobject *kobj,
}
static inline int sysfs_create_files(struct kobject *kobj,
- const struct attribute **attr)
+ const struct attribute * const *attr)
{
return 0;
}
@@ -377,7 +377,7 @@ static inline bool sysfs_remove_file_self(struct kobject *kobj,
}
static inline void sysfs_remove_files(struct kobject *kobj,
- const struct attribute **attr)
+ const struct attribute * const *attr)
{
}
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 1/2] sysfs: constify sysfs create/remove files harder
@ 2018-10-04 14:37 ` Jani Nikula
0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2018-10-04 14:37 UTC (permalink / raw)
To: linux-kernel, intel-gfx
Cc: jani.nikula, Greg Kroah-Hartman, Rafael J. Wysocki
Let the passed in array be const (and thus placed in rodata) instead of
a mutable array of const pointers.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
fs/sysfs/file.c | 4 ++--
include/linux/sysfs.h | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 0a7252aecfa5..bb71db63c99c 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -334,7 +334,7 @@ int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr,
}
EXPORT_SYMBOL_GPL(sysfs_create_file_ns);
-int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr)
+int sysfs_create_files(struct kobject *kobj, const struct attribute * const *ptr)
{
int err = 0;
int i;
@@ -493,7 +493,7 @@ bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr)
return ret;
}
-void sysfs_remove_files(struct kobject *kobj, const struct attribute **ptr)
+void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *ptr)
{
int i;
for (i = 0; ptr[i]; i++)
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 987cefa337de..786816cf4aa5 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -234,7 +234,7 @@ int __must_check sysfs_create_file_ns(struct kobject *kobj,
const struct attribute *attr,
const void *ns);
int __must_check sysfs_create_files(struct kobject *kobj,
- const struct attribute **attr);
+ const struct attribute * const *attr);
int __must_check sysfs_chmod_file(struct kobject *kobj,
const struct attribute *attr, umode_t mode);
struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj,
@@ -243,7 +243,7 @@ void sysfs_unbreak_active_protection(struct kernfs_node *kn);
void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr,
const void *ns);
bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr);
-void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr);
+void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *attr);
int __must_check sysfs_create_bin_file(struct kobject *kobj,
const struct bin_attribute *attr);
@@ -342,7 +342,7 @@ static inline int sysfs_create_file_ns(struct kobject *kobj,
}
static inline int sysfs_create_files(struct kobject *kobj,
- const struct attribute **attr)
+ const struct attribute * const *attr)
{
return 0;
}
@@ -377,7 +377,7 @@ static inline bool sysfs_remove_file_self(struct kobject *kobj,
}
static inline void sysfs_remove_files(struct kobject *kobj,
- const struct attribute **attr)
+ const struct attribute * const *attr)
{
}
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 2/2] drm/i915/sysfs: make attrs arrays const
2018-10-04 14:37 ` Jani Nikula
(?)
@ 2018-10-04 14:37 ` Jani Nikula
2018-10-05 6:55 ` Rafael J. Wysocki
-1 siblings, 1 reply; 25+ messages in thread
From: Jani Nikula @ 2018-10-04 14:37 UTC (permalink / raw)
To: linux-kernel, intel-gfx
Cc: jani.nikula, Greg Kroah-Hartman, Rafael J. Wysocki
They don't need to be modified.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
index e5e6f6bb2b05..b9aa8515254e 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -483,7 +483,7 @@ static ssize_t gt_rp_mhz_show(struct device *kdev, struct device_attribute *attr
return snprintf(buf, PAGE_SIZE, "%d\n", val);
}
-static const struct attribute *gen6_attrs[] = {
+static const struct attribute * const gen6_attrs[] = {
&dev_attr_gt_act_freq_mhz.attr,
&dev_attr_gt_cur_freq_mhz.attr,
&dev_attr_gt_boost_freq_mhz.attr,
@@ -495,7 +495,7 @@ static const struct attribute *gen6_attrs[] = {
NULL,
};
-static const struct attribute *vlv_attrs[] = {
+static const struct attribute * const vlv_attrs[] = {
&dev_attr_gt_act_freq_mhz.attr,
&dev_attr_gt_cur_freq_mhz.attr,
&dev_attr_gt_boost_freq_mhz.attr,
--
2.11.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] sysfs: constify sysfs create/remove files harder
2018-10-04 14:37 ` Jani Nikula
(?)
(?)
@ 2018-10-04 14:51 ` Patchwork
-1 siblings, 0 replies; 25+ messages in thread
From: Patchwork @ 2018-10-04 14:51 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] sysfs: constify sysfs create/remove files harder
URL : https://patchwork.freedesktop.org/series/50558/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
fd1ccbdbc465 sysfs: constify sysfs create/remove files harder
-:53: WARNING:FUNCTION_ARGUMENTS: function definition argument 'const struct attribute * const' should also have an identifier name
#53: FILE: include/linux/sysfs.h:246:
+void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *attr);
total: 0 errors, 1 warnings, 0 checks, 48 lines checked
bac4039c6292 drm/i915/sysfs: make attrs arrays const
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/2] sysfs: constify sysfs create/remove files harder
2018-10-04 14:37 ` Jani Nikula
` (2 preceding siblings ...)
(?)
@ 2018-10-04 15:17 ` Patchwork
-1 siblings, 0 replies; 25+ messages in thread
From: Patchwork @ 2018-10-04 15:17 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] sysfs: constify sysfs create/remove files harder
URL : https://patchwork.freedesktop.org/series/50558/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4931 -> Patchwork_10362 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50558/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_10362 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@amdgpu/amd_cs_nop@sync-fork-compute0:
fi-kbl-8809g: PASS -> DMESG-WARN (fdo#107762)
igt@gem_exec_suspend@basic-s3:
fi-bdw-samus: NOTRUN -> INCOMPLETE (fdo#107773)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
fi-byt-clapper: PASS -> FAIL (fdo#107362, fdo#103191)
==== Possible fixes ====
igt@gem_ctx_param@basic-default:
fi-pnv-d510: INCOMPLETE (fdo#106007) -> SKIP
igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
fi-byt-clapper: FAIL (fdo#107362, fdo#103191) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-a:
fi-byt-clapper: FAIL (fdo#107362) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-cfl-8109u: INCOMPLETE (fdo#106070, fdo#108126) -> PASS
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#106007 https://bugs.freedesktop.org/show_bug.cgi?id=106007
fdo#106070 https://bugs.freedesktop.org/show_bug.cgi?id=106070
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107762 https://bugs.freedesktop.org/show_bug.cgi?id=107762
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#108126 https://bugs.freedesktop.org/show_bug.cgi?id=108126
== Participating hosts (48 -> 43) ==
Additional (2): fi-icl-u fi-bdw-samus
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-ctg-p8600 fi-kbl-7560u
== Build changes ==
* Linux: CI_DRM_4931 -> Patchwork_10362
CI_DRM_4931: 826702bf60ae2b37841c051ed769b44af194fbb1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4667: 596f48dcd59fd2f8c16671514f3e69d4a2891374 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10362: bac4039c629245599634a1a25a4029671408cc7a @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
bac4039c6292 drm/i915/sysfs: make attrs arrays const
fd1ccbdbc465 sysfs: constify sysfs create/remove files harder
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10362/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
* ✗ Fi.CI.IGT: failure for series starting with [1/2] sysfs: constify sysfs create/remove files harder
2018-10-04 14:37 ` Jani Nikula
` (3 preceding siblings ...)
(?)
@ 2018-10-04 23:47 ` Patchwork
-1 siblings, 0 replies; 25+ messages in thread
From: Patchwork @ 2018-10-04 23:47 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] sysfs: constify sysfs create/remove files harder
URL : https://patchwork.freedesktop.org/series/50558/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_4931_full -> Patchwork_10362_full =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10362_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_10362_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10362_full:
=== IGT changes ===
==== Possible regressions ====
igt@kms_atomic_interruptible@legacy-pageflip:
shard-kbl: PASS -> DMESG-WARN
igt@kms_flip_tiling@flip-to-x-tiled:
shard-skl: PASS -> FAIL
== Known issues ==
Here are the changes found in Patchwork_10362_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_suspend@shrink:
shard-skl: NOTRUN -> INCOMPLETE (fdo#106886)
igt@gem_exec_schedule@pi-ringfull-bsd:
shard-skl: NOTRUN -> FAIL (fdo#103158)
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-skl: NOTRUN -> TIMEOUT (fdo#108039)
igt@gem_softpin@softpin:
shard-apl: PASS -> INCOMPLETE (fdo#103927)
igt@kms_available_modes_crc@available_mode_test_crc:
shard-apl: PASS -> FAIL (fdo#106641)
igt@kms_busy@extended-modeset-hang-newfb-render-a:
shard-skl: NOTRUN -> DMESG-WARN (fdo#107956)
igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
shard-snb: PASS -> DMESG-WARN (fdo#107956)
igt@kms_cursor_crc@cursor-256x256-random:
shard-apl: PASS -> FAIL (fdo#103232) +2
igt@kms_cursor_crc@cursor-64x64-sliding:
shard-glk: PASS -> FAIL (fdo#103232) +2
igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
shard-glk: PASS -> DMESG-WARN (fdo#105763, fdo#106538) +1
igt@kms_fbcon_fbt@fbc-suspend:
shard-glk: PASS -> FAIL (fdo#105681, fdo#103833)
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
shard-glk: PASS -> FAIL (fdo#103167)
shard-apl: PASS -> FAIL (fdo#103167)
igt@kms_plane@pixel-format-pipe-a-planes:
shard-skl: NOTRUN -> DMESG-WARN (fdo#106885)
igt@kms_plane@plane-position-covered-pipe-c-planes:
shard-apl: PASS -> FAIL (fdo#103166)
{igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb}:
shard-skl: NOTRUN -> FAIL (fdo#108145)
igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
shard-glk: PASS -> FAIL (fdo#103166)
igt@pm_rpm@fences-dpms:
shard-skl: PASS -> INCOMPLETE (fdo#107807)
==== Possible fixes ====
igt@drv_suspend@fence-restore-untiled:
shard-kbl: INCOMPLETE (fdo#103665) -> PASS
igt@kms_cursor_crc@cursor-256x256-sliding:
shard-glk: FAIL (fdo#103232) -> PASS +1
igt@kms_cursor_crc@cursor-256x85-sliding:
shard-apl: FAIL (fdo#103232) -> PASS +1
igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-xtiled:
shard-skl: FAIL (fdo#107791) -> PASS
igt@kms_draw_crc@fill-fb:
shard-skl: FAIL -> PASS
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-skl: FAIL (fdo#105363) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
shard-apl: FAIL (fdo#103167) -> PASS
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
shard-glk: FAIL (fdo#103167) -> PASS
igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-shrfb-draw-mmap-cpu:
shard-skl: FAIL (fdo#103167) -> PASS +2
{igt@kms_plane_alpha_blend@pipe-a-coverage-7efc}:
shard-skl: FAIL (fdo#108145) -> PASS
igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
shard-glk: FAIL (fdo#103166) -> PASS
igt@kms_universal_plane@universal-plane-pipe-c-functional:
shard-apl: FAIL (fdo#103166) -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103833 https://bugs.freedesktop.org/show_bug.cgi?id=103833
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105681 https://bugs.freedesktop.org/show_bug.cgi?id=105681
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
fdo#106885 https://bugs.freedesktop.org/show_bug.cgi?id=106885
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#107791 https://bugs.freedesktop.org/show_bug.cgi?id=107791
fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108039 https://bugs.freedesktop.org/show_bug.cgi?id=108039
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
== Participating hosts (6 -> 6) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4931 -> Patchwork_10362
CI_DRM_4931: 826702bf60ae2b37841c051ed769b44af194fbb1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4667: 596f48dcd59fd2f8c16671514f3e69d4a2891374 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10362: bac4039c629245599634a1a25a4029671408cc7a @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10362/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
2018-10-04 14:37 ` Jani Nikula
@ 2018-10-05 6:54 ` Rafael J. Wysocki
-1 siblings, 0 replies; 25+ messages in thread
From: Rafael J. Wysocki @ 2018-10-05 6:54 UTC (permalink / raw)
To: Jani Nikula
Cc: Linux Kernel Mailing List, intel-gfx, Greg Kroah-Hartman,
Rafael J. Wysocki
On Thu, Oct 4, 2018 at 4:38 PM Jani Nikula <jani.nikula@intel.com> wrote:
>
> Let the passed in array be const (and thus placed in rodata) instead of
> a mutable array of const pointers.
I'm not sure if the changes guarantee what you want. If I'm not
mistaken, they just mean that the function itself cannot modify either
the pointer passed to it, or the contents of the array pointed to by
that pointer. They don't imply the location of the array itself,
though.
As for the changes:
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> fs/sysfs/file.c | 4 ++--
> include/linux/sysfs.h | 8 ++++----
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
> index 0a7252aecfa5..bb71db63c99c 100644
> --- a/fs/sysfs/file.c
> +++ b/fs/sysfs/file.c
> @@ -334,7 +334,7 @@ int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr,
> }
> EXPORT_SYMBOL_GPL(sysfs_create_file_ns);
>
> -int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr)
> +int sysfs_create_files(struct kobject *kobj, const struct attribute * const *ptr)
> {
> int err = 0;
> int i;
> @@ -493,7 +493,7 @@ bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr)
> return ret;
> }
>
> -void sysfs_remove_files(struct kobject *kobj, const struct attribute **ptr)
> +void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *ptr)
> {
> int i;
> for (i = 0; ptr[i]; i++)
> diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
> index 987cefa337de..786816cf4aa5 100644
> --- a/include/linux/sysfs.h
> +++ b/include/linux/sysfs.h
> @@ -234,7 +234,7 @@ int __must_check sysfs_create_file_ns(struct kobject *kobj,
> const struct attribute *attr,
> const void *ns);
> int __must_check sysfs_create_files(struct kobject *kobj,
> - const struct attribute **attr);
> + const struct attribute * const *attr);
> int __must_check sysfs_chmod_file(struct kobject *kobj,
> const struct attribute *attr, umode_t mode);
> struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj,
> @@ -243,7 +243,7 @@ void sysfs_unbreak_active_protection(struct kernfs_node *kn);
> void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr,
> const void *ns);
> bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr);
> -void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr);
> +void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *attr);
>
> int __must_check sysfs_create_bin_file(struct kobject *kobj,
> const struct bin_attribute *attr);
> @@ -342,7 +342,7 @@ static inline int sysfs_create_file_ns(struct kobject *kobj,
> }
>
> static inline int sysfs_create_files(struct kobject *kobj,
> - const struct attribute **attr)
> + const struct attribute * const *attr)
> {
> return 0;
> }
> @@ -377,7 +377,7 @@ static inline bool sysfs_remove_file_self(struct kobject *kobj,
> }
>
> static inline void sysfs_remove_files(struct kobject *kobj,
> - const struct attribute **attr)
> + const struct attribute * const *attr)
> {
> }
>
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
@ 2018-10-05 6:54 ` Rafael J. Wysocki
0 siblings, 0 replies; 25+ messages in thread
From: Rafael J. Wysocki @ 2018-10-05 6:54 UTC (permalink / raw)
To: Jani Nikula
Cc: Greg Kroah-Hartman, intel-gfx, Linux Kernel Mailing List,
Rafael J. Wysocki
On Thu, Oct 4, 2018 at 4:38 PM Jani Nikula <jani.nikula@intel.com> wrote:
>
> Let the passed in array be const (and thus placed in rodata) instead of
> a mutable array of const pointers.
I'm not sure if the changes guarantee what you want. If I'm not
mistaken, they just mean that the function itself cannot modify either
the pointer passed to it, or the contents of the array pointed to by
that pointer. They don't imply the location of the array itself,
though.
As for the changes:
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> fs/sysfs/file.c | 4 ++--
> include/linux/sysfs.h | 8 ++++----
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
> index 0a7252aecfa5..bb71db63c99c 100644
> --- a/fs/sysfs/file.c
> +++ b/fs/sysfs/file.c
> @@ -334,7 +334,7 @@ int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr,
> }
> EXPORT_SYMBOL_GPL(sysfs_create_file_ns);
>
> -int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr)
> +int sysfs_create_files(struct kobject *kobj, const struct attribute * const *ptr)
> {
> int err = 0;
> int i;
> @@ -493,7 +493,7 @@ bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr)
> return ret;
> }
>
> -void sysfs_remove_files(struct kobject *kobj, const struct attribute **ptr)
> +void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *ptr)
> {
> int i;
> for (i = 0; ptr[i]; i++)
> diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
> index 987cefa337de..786816cf4aa5 100644
> --- a/include/linux/sysfs.h
> +++ b/include/linux/sysfs.h
> @@ -234,7 +234,7 @@ int __must_check sysfs_create_file_ns(struct kobject *kobj,
> const struct attribute *attr,
> const void *ns);
> int __must_check sysfs_create_files(struct kobject *kobj,
> - const struct attribute **attr);
> + const struct attribute * const *attr);
> int __must_check sysfs_chmod_file(struct kobject *kobj,
> const struct attribute *attr, umode_t mode);
> struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj,
> @@ -243,7 +243,7 @@ void sysfs_unbreak_active_protection(struct kernfs_node *kn);
> void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr,
> const void *ns);
> bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr);
> -void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr);
> +void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *attr);
>
> int __must_check sysfs_create_bin_file(struct kobject *kobj,
> const struct bin_attribute *attr);
> @@ -342,7 +342,7 @@ static inline int sysfs_create_file_ns(struct kobject *kobj,
> }
>
> static inline int sysfs_create_files(struct kobject *kobj,
> - const struct attribute **attr)
> + const struct attribute * const *attr)
> {
> return 0;
> }
> @@ -377,7 +377,7 @@ static inline bool sysfs_remove_file_self(struct kobject *kobj,
> }
>
> static inline void sysfs_remove_files(struct kobject *kobj,
> - const struct attribute **attr)
> + const struct attribute * const *attr)
> {
> }
>
> --
> 2.11.0
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 2/2] drm/i915/sysfs: make attrs arrays const
2018-10-04 14:37 ` [PATCH 2/2] drm/i915/sysfs: make attrs arrays const Jani Nikula
@ 2018-10-05 6:55 ` Rafael J. Wysocki
0 siblings, 0 replies; 25+ messages in thread
From: Rafael J. Wysocki @ 2018-10-05 6:55 UTC (permalink / raw)
To: Jani Nikula
Cc: Linux Kernel Mailing List, intel-gfx, Greg Kroah-Hartman,
Rafael J. Wysocki
On Thu, Oct 4, 2018 at 4:38 PM Jani Nikula <jani.nikula@intel.com> wrote:
>
> They don't need to be modified.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/gpu/drm/i915/i915_sysfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
> index e5e6f6bb2b05..b9aa8515254e 100644
> --- a/drivers/gpu/drm/i915/i915_sysfs.c
> +++ b/drivers/gpu/drm/i915/i915_sysfs.c
> @@ -483,7 +483,7 @@ static ssize_t gt_rp_mhz_show(struct device *kdev, struct device_attribute *attr
> return snprintf(buf, PAGE_SIZE, "%d\n", val);
> }
>
> -static const struct attribute *gen6_attrs[] = {
> +static const struct attribute * const gen6_attrs[] = {
> &dev_attr_gt_act_freq_mhz.attr,
> &dev_attr_gt_cur_freq_mhz.attr,
> &dev_attr_gt_boost_freq_mhz.attr,
> @@ -495,7 +495,7 @@ static const struct attribute *gen6_attrs[] = {
> NULL,
> };
>
> -static const struct attribute *vlv_attrs[] = {
> +static const struct attribute * const vlv_attrs[] = {
> &dev_attr_gt_act_freq_mhz.attr,
> &dev_attr_gt_cur_freq_mhz.attr,
> &dev_attr_gt_boost_freq_mhz.attr,
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 2/2] drm/i915/sysfs: make attrs arrays const
@ 2018-10-05 6:55 ` Rafael J. Wysocki
0 siblings, 0 replies; 25+ messages in thread
From: Rafael J. Wysocki @ 2018-10-05 6:55 UTC (permalink / raw)
To: Jani Nikula
Cc: Greg Kroah-Hartman, intel-gfx, Linux Kernel Mailing List,
Rafael J. Wysocki
On Thu, Oct 4, 2018 at 4:38 PM Jani Nikula <jani.nikula@intel.com> wrote:
>
> They don't need to be modified.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/gpu/drm/i915/i915_sysfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
> index e5e6f6bb2b05..b9aa8515254e 100644
> --- a/drivers/gpu/drm/i915/i915_sysfs.c
> +++ b/drivers/gpu/drm/i915/i915_sysfs.c
> @@ -483,7 +483,7 @@ static ssize_t gt_rp_mhz_show(struct device *kdev, struct device_attribute *attr
> return snprintf(buf, PAGE_SIZE, "%d\n", val);
> }
>
> -static const struct attribute *gen6_attrs[] = {
> +static const struct attribute * const gen6_attrs[] = {
> &dev_attr_gt_act_freq_mhz.attr,
> &dev_attr_gt_cur_freq_mhz.attr,
> &dev_attr_gt_boost_freq_mhz.attr,
> @@ -495,7 +495,7 @@ static const struct attribute *gen6_attrs[] = {
> NULL,
> };
>
> -static const struct attribute *vlv_attrs[] = {
> +static const struct attribute * const vlv_attrs[] = {
> &dev_attr_gt_act_freq_mhz.attr,
> &dev_attr_gt_cur_freq_mhz.attr,
> &dev_attr_gt_boost_freq_mhz.attr,
> --
> 2.11.0
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
2018-10-05 6:54 ` Rafael J. Wysocki
@ 2018-10-05 7:36 ` Jani Nikula
-1 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2018-10-05 7:36 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux Kernel Mailing List, intel-gfx, Greg Kroah-Hartman,
Rafael J. Wysocki
On Fri, 05 Oct 2018, "Rafael J. Wysocki" <rafael@kernel.org> wrote:
> On Thu, Oct 4, 2018 at 4:38 PM Jani Nikula <jani.nikula@intel.com> wrote:
>>
>> Let the passed in array be const (and thus placed in rodata) instead of
>> a mutable array of const pointers.
>
> I'm not sure if the changes guarantee what you want. If I'm not
> mistaken, they just mean that the function itself cannot modify either
> the pointer passed to it, or the contents of the array pointed to by
> that pointer. They don't imply the location of the array itself,
> though.
I mean, this change allows the caller to add the appropriate const
qualifiers to the array definition, allowing the placement in
rodata. Can't do that withouth the extra const in the function.
> As for the changes:
>
> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Thanks for the review.
BR,
Jani.
>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>> fs/sysfs/file.c | 4 ++--
>> include/linux/sysfs.h | 8 ++++----
>> 2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
>> index 0a7252aecfa5..bb71db63c99c 100644
>> --- a/fs/sysfs/file.c
>> +++ b/fs/sysfs/file.c
>> @@ -334,7 +334,7 @@ int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr,
>> }
>> EXPORT_SYMBOL_GPL(sysfs_create_file_ns);
>>
>> -int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr)
>> +int sysfs_create_files(struct kobject *kobj, const struct attribute * const *ptr)
>> {
>> int err = 0;
>> int i;
>> @@ -493,7 +493,7 @@ bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr)
>> return ret;
>> }
>>
>> -void sysfs_remove_files(struct kobject *kobj, const struct attribute **ptr)
>> +void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *ptr)
>> {
>> int i;
>> for (i = 0; ptr[i]; i++)
>> diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
>> index 987cefa337de..786816cf4aa5 100644
>> --- a/include/linux/sysfs.h
>> +++ b/include/linux/sysfs.h
>> @@ -234,7 +234,7 @@ int __must_check sysfs_create_file_ns(struct kobject *kobj,
>> const struct attribute *attr,
>> const void *ns);
>> int __must_check sysfs_create_files(struct kobject *kobj,
>> - const struct attribute **attr);
>> + const struct attribute * const *attr);
>> int __must_check sysfs_chmod_file(struct kobject *kobj,
>> const struct attribute *attr, umode_t mode);
>> struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj,
>> @@ -243,7 +243,7 @@ void sysfs_unbreak_active_protection(struct kernfs_node *kn);
>> void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr,
>> const void *ns);
>> bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr);
>> -void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr);
>> +void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *attr);
>>
>> int __must_check sysfs_create_bin_file(struct kobject *kobj,
>> const struct bin_attribute *attr);
>> @@ -342,7 +342,7 @@ static inline int sysfs_create_file_ns(struct kobject *kobj,
>> }
>>
>> static inline int sysfs_create_files(struct kobject *kobj,
>> - const struct attribute **attr)
>> + const struct attribute * const *attr)
>> {
>> return 0;
>> }
>> @@ -377,7 +377,7 @@ static inline bool sysfs_remove_file_self(struct kobject *kobj,
>> }
>>
>> static inline void sysfs_remove_files(struct kobject *kobj,
>> - const struct attribute **attr)
>> + const struct attribute * const *attr)
>> {
>> }
>>
>> --
>> 2.11.0
>>
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
@ 2018-10-05 7:36 ` Jani Nikula
0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2018-10-05 7:36 UTC (permalink / raw)
Cc: Greg Kroah-Hartman, intel-gfx, Linux Kernel Mailing List,
Rafael J. Wysocki
On Fri, 05 Oct 2018, "Rafael J. Wysocki" <rafael@kernel.org> wrote:
> On Thu, Oct 4, 2018 at 4:38 PM Jani Nikula <jani.nikula@intel.com> wrote:
>>
>> Let the passed in array be const (and thus placed in rodata) instead of
>> a mutable array of const pointers.
>
> I'm not sure if the changes guarantee what you want. If I'm not
> mistaken, they just mean that the function itself cannot modify either
> the pointer passed to it, or the contents of the array pointed to by
> that pointer. They don't imply the location of the array itself,
> though.
I mean, this change allows the caller to add the appropriate const
qualifiers to the array definition, allowing the placement in
rodata. Can't do that withouth the extra const in the function.
> As for the changes:
>
> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Thanks for the review.
BR,
Jani.
>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>> fs/sysfs/file.c | 4 ++--
>> include/linux/sysfs.h | 8 ++++----
>> 2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
>> index 0a7252aecfa5..bb71db63c99c 100644
>> --- a/fs/sysfs/file.c
>> +++ b/fs/sysfs/file.c
>> @@ -334,7 +334,7 @@ int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr,
>> }
>> EXPORT_SYMBOL_GPL(sysfs_create_file_ns);
>>
>> -int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr)
>> +int sysfs_create_files(struct kobject *kobj, const struct attribute * const *ptr)
>> {
>> int err = 0;
>> int i;
>> @@ -493,7 +493,7 @@ bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr)
>> return ret;
>> }
>>
>> -void sysfs_remove_files(struct kobject *kobj, const struct attribute **ptr)
>> +void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *ptr)
>> {
>> int i;
>> for (i = 0; ptr[i]; i++)
>> diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
>> index 987cefa337de..786816cf4aa5 100644
>> --- a/include/linux/sysfs.h
>> +++ b/include/linux/sysfs.h
>> @@ -234,7 +234,7 @@ int __must_check sysfs_create_file_ns(struct kobject *kobj,
>> const struct attribute *attr,
>> const void *ns);
>> int __must_check sysfs_create_files(struct kobject *kobj,
>> - const struct attribute **attr);
>> + const struct attribute * const *attr);
>> int __must_check sysfs_chmod_file(struct kobject *kobj,
>> const struct attribute *attr, umode_t mode);
>> struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj,
>> @@ -243,7 +243,7 @@ void sysfs_unbreak_active_protection(struct kernfs_node *kn);
>> void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr,
>> const void *ns);
>> bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr);
>> -void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr);
>> +void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *attr);
>>
>> int __must_check sysfs_create_bin_file(struct kobject *kobj,
>> const struct bin_attribute *attr);
>> @@ -342,7 +342,7 @@ static inline int sysfs_create_file_ns(struct kobject *kobj,
>> }
>>
>> static inline int sysfs_create_files(struct kobject *kobj,
>> - const struct attribute **attr)
>> + const struct attribute * const *attr)
>> {
>> return 0;
>> }
>> @@ -377,7 +377,7 @@ static inline bool sysfs_remove_file_self(struct kobject *kobj,
>> }
>>
>> static inline void sysfs_remove_files(struct kobject *kobj,
>> - const struct attribute **attr)
>> + const struct attribute * const *attr)
>> {
>> }
>>
>> --
>> 2.11.0
>>
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
2018-10-05 7:36 ` Jani Nikula
(?)
@ 2018-10-05 7:41 ` Rafael J. Wysocki
-1 siblings, 0 replies; 25+ messages in thread
From: Rafael J. Wysocki @ 2018-10-05 7:41 UTC (permalink / raw)
To: Jani Nikula
Cc: Rafael J. Wysocki, Linux Kernel Mailing List, intel-gfx,
Greg Kroah-Hartman
On Fri, Oct 5, 2018 at 9:36 AM Jani Nikula <jani.nikula@intel.com> wrote:
>
> On Fri, 05 Oct 2018, "Rafael J. Wysocki" <rafael@kernel.org> wrote:
> > On Thu, Oct 4, 2018 at 4:38 PM Jani Nikula <jani.nikula@intel.com> wrote:
> >>
> >> Let the passed in array be const (and thus placed in rodata) instead of
> >> a mutable array of const pointers.
> >
> > I'm not sure if the changes guarantee what you want. If I'm not
> > mistaken, they just mean that the function itself cannot modify either
> > the pointer passed to it, or the contents of the array pointed to by
> > that pointer. They don't imply the location of the array itself,
> > though.
>
> I mean, this change allows the caller to add the appropriate const
> qualifiers to the array definition, allowing the placement in
> rodata. Can't do that withouth the extra const in the function.
I figured that out, but the changelog is a bit unclear. If you said
"Allow ..." instead of "Let ...", it would be somewhat clearer IMO.
:-)
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
2018-10-04 14:37 ` Jani Nikula
@ 2018-10-16 10:48 ` Greg Kroah-Hartman
-1 siblings, 0 replies; 25+ messages in thread
From: Greg Kroah-Hartman @ 2018-10-16 10:48 UTC (permalink / raw)
To: Jani Nikula; +Cc: linux-kernel, intel-gfx, Rafael J. Wysocki
On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
> Let the passed in array be const (and thus placed in rodata) instead of
> a mutable array of const pointers.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> fs/sysfs/file.c | 4 ++--
> include/linux/sysfs.h | 8 ++++----
> 2 files changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
@ 2018-10-16 10:48 ` Greg Kroah-Hartman
0 siblings, 0 replies; 25+ messages in thread
From: Greg Kroah-Hartman @ 2018-10-16 10:48 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, linux-kernel, Rafael J. Wysocki
On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
> Let the passed in array be const (and thus placed in rodata) instead of
> a mutable array of const pointers.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> fs/sysfs/file.c | 4 ++--
> include/linux/sysfs.h | 8 ++++----
> 2 files changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
2018-10-16 10:48 ` Greg Kroah-Hartman
@ 2018-10-16 11:38 ` Jani Nikula
-1 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2018-10-16 11:38 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel, intel-gfx, Rafael J. Wysocki
On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
>> Let the passed in array be const (and thus placed in rodata) instead of
>> a mutable array of const pointers.
>>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>> fs/sysfs/file.c | 4 ++--
>> include/linux/sysfs.h | 8 ++++----
>> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thanks; who should pick them up?
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
@ 2018-10-16 11:38 ` Jani Nikula
0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2018-10-16 11:38 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: intel-gfx, linux-kernel, Rafael J. Wysocki
On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
>> Let the passed in array be const (and thus placed in rodata) instead of
>> a mutable array of const pointers.
>>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>> fs/sysfs/file.c | 4 ++--
>> include/linux/sysfs.h | 8 ++++----
>> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thanks; who should pick them up?
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
2018-10-16 11:38 ` Jani Nikula
@ 2018-10-16 11:43 ` Greg Kroah-Hartman
-1 siblings, 0 replies; 25+ messages in thread
From: Greg Kroah-Hartman @ 2018-10-16 11:43 UTC (permalink / raw)
To: Jani Nikula; +Cc: linux-kernel, intel-gfx, Rafael J. Wysocki
On Tue, Oct 16, 2018 at 02:38:53PM +0300, Jani Nikula wrote:
> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
> >> Let the passed in array be const (and thus placed in rodata) instead of
> >> a mutable array of const pointers.
> >>
> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >> ---
> >> fs/sysfs/file.c | 4 ++--
> >> include/linux/sysfs.h | 8 ++++----
> >> 2 files changed, 6 insertions(+), 6 deletions(-)
> >
> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> Thanks; who should pick them up?
I could pick the first one up, but as you need this for a drm patch,
both should probably go through that tree, right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
@ 2018-10-16 11:43 ` Greg Kroah-Hartman
0 siblings, 0 replies; 25+ messages in thread
From: Greg Kroah-Hartman @ 2018-10-16 11:43 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, linux-kernel, Rafael J. Wysocki
On Tue, Oct 16, 2018 at 02:38:53PM +0300, Jani Nikula wrote:
> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
> >> Let the passed in array be const (and thus placed in rodata) instead of
> >> a mutable array of const pointers.
> >>
> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >> ---
> >> fs/sysfs/file.c | 4 ++--
> >> include/linux/sysfs.h | 8 ++++----
> >> 2 files changed, 6 insertions(+), 6 deletions(-)
> >
> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> Thanks; who should pick them up?
I could pick the first one up, but as you need this for a drm patch,
both should probably go through that tree, right?
thanks,
greg k-h
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
2018-10-16 11:43 ` Greg Kroah-Hartman
@ 2018-10-16 12:10 ` Jani Nikula
-1 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2018-10-16 12:10 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel, intel-gfx, Rafael J. Wysocki
On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> On Tue, Oct 16, 2018 at 02:38:53PM +0300, Jani Nikula wrote:
>> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>> > On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
>> >> Let the passed in array be const (and thus placed in rodata) instead of
>> >> a mutable array of const pointers.
>> >>
>> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> >> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> >> ---
>> >> fs/sysfs/file.c | 4 ++--
>> >> include/linux/sysfs.h | 8 ++++----
>> >> 2 files changed, 6 insertions(+), 6 deletions(-)
>> >
>> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>
>> Thanks; who should pick them up?
>
> I could pick the first one up, but as you need this for a drm patch,
> both should probably go through that tree, right?
I can pick them both if it doesn't bother you that the sysfs parts will
be merged in the merge window for v4.21 i.e. the change would be in drm
trees for an entire release cycle. We've been done for v4.20 merge
window for a while now.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
@ 2018-10-16 12:10 ` Jani Nikula
0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2018-10-16 12:10 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: intel-gfx, linux-kernel, Rafael J. Wysocki
On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> On Tue, Oct 16, 2018 at 02:38:53PM +0300, Jani Nikula wrote:
>> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>> > On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
>> >> Let the passed in array be const (and thus placed in rodata) instead of
>> >> a mutable array of const pointers.
>> >>
>> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> >> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> >> ---
>> >> fs/sysfs/file.c | 4 ++--
>> >> include/linux/sysfs.h | 8 ++++----
>> >> 2 files changed, 6 insertions(+), 6 deletions(-)
>> >
>> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>
>> Thanks; who should pick them up?
>
> I could pick the first one up, but as you need this for a drm patch,
> both should probably go through that tree, right?
I can pick them both if it doesn't bother you that the sysfs parts will
be merged in the merge window for v4.21 i.e. the change would be in drm
trees for an entire release cycle. We've been done for v4.20 merge
window for a while now.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
2018-10-16 12:10 ` Jani Nikula
@ 2018-10-16 12:47 ` Greg Kroah-Hartman
-1 siblings, 0 replies; 25+ messages in thread
From: Greg Kroah-Hartman @ 2018-10-16 12:47 UTC (permalink / raw)
To: Jani Nikula; +Cc: linux-kernel, intel-gfx, Rafael J. Wysocki
On Tue, Oct 16, 2018 at 03:10:24PM +0300, Jani Nikula wrote:
> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > On Tue, Oct 16, 2018 at 02:38:53PM +0300, Jani Nikula wrote:
> >> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> >> > On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
> >> >> Let the passed in array be const (and thus placed in rodata) instead of
> >> >> a mutable array of const pointers.
> >> >>
> >> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >> >> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> >> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >> >> ---
> >> >> fs/sysfs/file.c | 4 ++--
> >> >> include/linux/sysfs.h | 8 ++++----
> >> >> 2 files changed, 6 insertions(+), 6 deletions(-)
> >> >
> >> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >>
> >> Thanks; who should pick them up?
> >
> > I could pick the first one up, but as you need this for a drm patch,
> > both should probably go through that tree, right?
>
> I can pick them both if it doesn't bother you that the sysfs parts will
> be merged in the merge window for v4.21 i.e. the change would be in drm
> trees for an entire release cycle. We've been done for v4.20 merge
> window for a while now.
No objection from me.
greg k-h
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
@ 2018-10-16 12:47 ` Greg Kroah-Hartman
0 siblings, 0 replies; 25+ messages in thread
From: Greg Kroah-Hartman @ 2018-10-16 12:47 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, linux-kernel, Rafael J. Wysocki
On Tue, Oct 16, 2018 at 03:10:24PM +0300, Jani Nikula wrote:
> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > On Tue, Oct 16, 2018 at 02:38:53PM +0300, Jani Nikula wrote:
> >> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> >> > On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
> >> >> Let the passed in array be const (and thus placed in rodata) instead of
> >> >> a mutable array of const pointers.
> >> >>
> >> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >> >> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> >> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >> >> ---
> >> >> fs/sysfs/file.c | 4 ++--
> >> >> include/linux/sysfs.h | 8 ++++----
> >> >> 2 files changed, 6 insertions(+), 6 deletions(-)
> >> >
> >> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >>
> >> Thanks; who should pick them up?
> >
> > I could pick the first one up, but as you need this for a drm patch,
> > both should probably go through that tree, right?
>
> I can pick them both if it doesn't bother you that the sysfs parts will
> be merged in the merge window for v4.21 i.e. the change would be in drm
> trees for an entire release cycle. We've been done for v4.20 merge
> window for a while now.
No objection from me.
greg k-h
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
2018-10-16 12:47 ` Greg Kroah-Hartman
@ 2018-10-31 10:05 ` Jani Nikula
-1 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2018-10-31 10:05 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel, intel-gfx, Rafael J. Wysocki
On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> On Tue, Oct 16, 2018 at 03:10:24PM +0300, Jani Nikula wrote:
>> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>> > On Tue, Oct 16, 2018 at 02:38:53PM +0300, Jani Nikula wrote:
>> >> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>> >> > On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
>> >> >> Let the passed in array be const (and thus placed in rodata) instead of
>> >> >> a mutable array of const pointers.
>> >> >>
>> >> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> >> >> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> >> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> >> >> ---
>> >> >> fs/sysfs/file.c | 4 ++--
>> >> >> include/linux/sysfs.h | 8 ++++----
>> >> >> 2 files changed, 6 insertions(+), 6 deletions(-)
>> >> >
>> >> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> >>
>> >> Thanks; who should pick them up?
>> >
>> > I could pick the first one up, but as you need this for a drm patch,
>> > both should probably go through that tree, right?
>>
>> I can pick them both if it doesn't bother you that the sysfs parts will
>> be merged in the merge window for v4.21 i.e. the change would be in drm
>> trees for an entire release cycle. We've been done for v4.20 merge
>> window for a while now.
>
> No objection from me.
Argh, I dropped the ball a bit. May I take that as an ack to merge via
drm-intel? I try to be careful not to assume acks and reviews.
Thanks,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
@ 2018-10-31 10:05 ` Jani Nikula
0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2018-10-31 10:05 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: intel-gfx, linux-kernel, Rafael J. Wysocki
On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> On Tue, Oct 16, 2018 at 03:10:24PM +0300, Jani Nikula wrote:
>> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>> > On Tue, Oct 16, 2018 at 02:38:53PM +0300, Jani Nikula wrote:
>> >> On Tue, 16 Oct 2018, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>> >> > On Thu, Oct 04, 2018 at 05:37:49PM +0300, Jani Nikula wrote:
>> >> >> Let the passed in array be const (and thus placed in rodata) instead of
>> >> >> a mutable array of const pointers.
>> >> >>
>> >> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> >> >> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
>> >> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> >> >> ---
>> >> >> fs/sysfs/file.c | 4 ++--
>> >> >> include/linux/sysfs.h | 8 ++++----
>> >> >> 2 files changed, 6 insertions(+), 6 deletions(-)
>> >> >
>> >> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> >>
>> >> Thanks; who should pick them up?
>> >
>> > I could pick the first one up, but as you need this for a drm patch,
>> > both should probably go through that tree, right?
>>
>> I can pick them both if it doesn't bother you that the sysfs parts will
>> be merged in the merge window for v4.21 i.e. the change would be in drm
>> trees for an entire release cycle. We've been done for v4.20 merge
>> window for a while now.
>
> No objection from me.
Argh, I dropped the ball a bit. May I take that as an ack to merge via
drm-intel? I try to be careful not to assume acks and reviews.
Thanks,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2018-10-31 10:05 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 14:37 [PATCH 1/2] sysfs: constify sysfs create/remove files harder Jani Nikula
2018-10-04 14:37 ` Jani Nikula
2018-10-04 14:37 ` [PATCH 2/2] drm/i915/sysfs: make attrs arrays const Jani Nikula
2018-10-05 6:55 ` Rafael J. Wysocki
2018-10-05 6:55 ` Rafael J. Wysocki
2018-10-04 14:51 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] sysfs: constify sysfs create/remove files harder Patchwork
2018-10-04 15:17 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-04 23:47 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-10-05 6:54 ` [PATCH 1/2] " Rafael J. Wysocki
2018-10-05 6:54 ` Rafael J. Wysocki
2018-10-05 7:36 ` Jani Nikula
2018-10-05 7:36 ` Jani Nikula
2018-10-05 7:41 ` Rafael J. Wysocki
2018-10-16 10:48 ` Greg Kroah-Hartman
2018-10-16 10:48 ` Greg Kroah-Hartman
2018-10-16 11:38 ` Jani Nikula
2018-10-16 11:38 ` Jani Nikula
2018-10-16 11:43 ` Greg Kroah-Hartman
2018-10-16 11:43 ` Greg Kroah-Hartman
2018-10-16 12:10 ` Jani Nikula
2018-10-16 12:10 ` Jani Nikula
2018-10-16 12:47 ` Greg Kroah-Hartman
2018-10-16 12:47 ` Greg Kroah-Hartman
2018-10-31 10:05 ` Jani Nikula
2018-10-31 10:05 ` Jani Nikula
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.