This is a note to let you know that I've just added the patch titled
usb: gadget: remove redundant self assignment
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
usb-gadget-remove-redundant-self-assignment.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 8a8b161df5ce06ef5a315899f83978e765be09e8 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan(a)agner.ch>
Date: Sun, 16 Apr 2017 20:12:50 -0700
Subject: usb: gadget: remove redundant self assignment
From: Stefan Agner <stefan(a)agner.ch>
commit 8a8b161df5ce06ef5a315899f83978e765be09e8 upstream.
The assignment ret = ret is redundant and can be removed.
Reviewed-by: Krzysztof Opasiak <k.opasiak(a)samsung.com>
Reviewed-by: Peter Chen <peter.chen(a)nxp.com>
Signed-off-by: Stefan Agner <stefan(a)agner.ch>
Signed-off-by: Felipe Balbi <felipe.balbi(a)linux.intel.com>
Cc: Nathan Chancellor <natechancellor(a)gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/gadget/udc/core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -139,10 +139,8 @@ int usb_ep_disable(struct usb_ep *ep)
goto out;
ret = ep->ops->disable(ep);
- if (ret) {
- ret = ret;
+ if (ret)
goto out;
- }
ep->enabled = false;
Patches currently in stable-queue which might be from stefan(a)agner.ch are
queue-4.9/usb-gadget-remove-redundant-self-assignment.patch
This is a note to let you know that I've just added the patch titled
selinux: Remove redundant check for unknown labeling behavior
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
selinux-remove-redundant-check-for-unknown-labeling-behavior.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 270e8573145a26de924e2dc644596332d400445b Mon Sep 17 00:00:00 2001
From: Matthias Kaehlcke <mka(a)chromium.org>
Date: Fri, 19 May 2017 10:09:32 -0700
Subject: selinux: Remove redundant check for unknown labeling behavior
From: Matthias Kaehlcke <mka(a)chromium.org>
commit 270e8573145a26de924e2dc644596332d400445b upstream.
The check is already performed in ocontext_read() when the policy is
loaded. Removing the array also fixes the following warning when
building with clang:
security/selinux/hooks.c:338:20: error: variable 'labeling_behaviors'
is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
Signed-off-by: Matthias Kaehlcke <mka(a)chromium.org>
Acked-by: Stephen Smalley <sds(a)tycho.nsa.gov>
Signed-off-by: Paul Moore <paul(a)paul-moore.com>
Cc: Nathan Chancellor <natechancellor(a)gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
security/selinux/hooks.c | 16 ----------------
1 file changed, 16 deletions(-)
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -406,18 +406,6 @@ static void superblock_free_security(str
kfree(sbsec);
}
-/* The file system's label must be initialized prior to use. */
-
-static const char *labeling_behaviors[7] = {
- "uses xattr",
- "uses transition SIDs",
- "uses task SIDs",
- "uses genfs_contexts",
- "not configured for labeling",
- "uses mountpoint labeling",
- "uses native labeling",
-};
-
static inline int inode_doinit(struct inode *inode)
{
return inode_doinit_with_dentry(inode, NULL);
@@ -528,10 +516,6 @@ static int sb_finish_set_opts(struct sup
}
}
- if (sbsec->behavior > ARRAY_SIZE(labeling_behaviors))
- printk(KERN_ERR "SELinux: initialized (dev %s, type %s), unknown behavior\n",
- sb->s_id, sb->s_type->name);
-
sbsec->flags |= SE_SBINITIALIZED;
if (selinux_is_sblabel_mnt(sb))
sbsec->flags |= SBLABEL_MNT;
Patches currently in stable-queue which might be from mka(a)chromium.org are
queue-4.9/dm-ioctl-remove-double-parentheses.patch
queue-4.9/arm64-avoid-overflow-in-va_start-and-page_offset.patch
queue-4.9/btrfs-remove-extra-parentheses-from-condition-in-copy_items.patch
queue-4.9/genirq-use-cpumask_available-for-check-of-cpumask-variable.patch
queue-4.9/nl80211-fix-enum-type-of-variable-in-nl80211_put_sta_rate.patch
queue-4.9/selinux-remove-redundant-check-for-unknown-labeling-behavior.patch
queue-4.9/fs-compat-remove-warning-from-compatible_ioctl.patch
queue-4.9/jiffies.h-declare-jiffies-and-jiffies_64-with-____cacheline_aligned_in_smp.patch
queue-4.9/selinux-remove-unnecessary-check-of-array-base-in-selinux_set_mapping.patch
queue-4.9/pci-make-pci_rom_address_mask-a-32-bit-constant.patch
queue-4.9/frv-declare-jiffies-to-be-located-in-the-.data-section.patch
queue-4.9/mac80211-ibss-fix-channel-type-enum-in-ieee80211_sta_join_ibss.patch
queue-4.9/cfg80211-fix-array-bounds-warning-in-fragment-copy.patch
queue-4.9/netfilter-ctnetlink-make-some-parameters-integer-to-avoid-enum-mismatch.patch
queue-4.9/mac80211-fix-clang-warning-about-constant-operand-in-logical-operation.patch
queue-4.9/cpumask-add-helper-cpumask_available.patch
This is a note to let you know that I've just added the patch titled
nl80211: Fix enum type of variable in nl80211_put_sta_rate()
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
nl80211-fix-enum-type-of-variable-in-nl80211_put_sta_rate.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From bbf67e450a5dc2a595e1e7a67b4869f1a7f5a338 Mon Sep 17 00:00:00 2001
From: Matthias Kaehlcke <mka(a)chromium.org>
Date: Mon, 17 Apr 2017 15:59:52 -0700
Subject: nl80211: Fix enum type of variable in nl80211_put_sta_rate()
From: Matthias Kaehlcke <mka(a)chromium.org>
commit bbf67e450a5dc2a595e1e7a67b4869f1a7f5a338 upstream.
rate_flg is of type 'enum nl80211_attrs', however it is assigned with
'enum nl80211_rate_info' values. Change the type of rate_flg accordingly.
Signed-off-by: Matthias Kaehlcke <mka(a)chromium.org>
Signed-off-by: Johannes Berg <johannes.berg(a)intel.com>
Cc: Nathan Chancellor <natechancellor(a)gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/wireless/nl80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4081,7 +4081,7 @@ static bool nl80211_put_sta_rate(struct
struct nlattr *rate;
u32 bitrate;
u16 bitrate_compat;
- enum nl80211_attrs rate_flg;
+ enum nl80211_rate_info rate_flg;
rate = nla_nest_start(msg, attr);
if (!rate)
Patches currently in stable-queue which might be from mka(a)chromium.org are
queue-4.9/dm-ioctl-remove-double-parentheses.patch
queue-4.9/arm64-avoid-overflow-in-va_start-and-page_offset.patch
queue-4.9/btrfs-remove-extra-parentheses-from-condition-in-copy_items.patch
queue-4.9/genirq-use-cpumask_available-for-check-of-cpumask-variable.patch
queue-4.9/nl80211-fix-enum-type-of-variable-in-nl80211_put_sta_rate.patch
queue-4.9/selinux-remove-redundant-check-for-unknown-labeling-behavior.patch
queue-4.9/fs-compat-remove-warning-from-compatible_ioctl.patch
queue-4.9/jiffies.h-declare-jiffies-and-jiffies_64-with-____cacheline_aligned_in_smp.patch
queue-4.9/selinux-remove-unnecessary-check-of-array-base-in-selinux_set_mapping.patch
queue-4.9/pci-make-pci_rom_address_mask-a-32-bit-constant.patch
queue-4.9/frv-declare-jiffies-to-be-located-in-the-.data-section.patch
queue-4.9/mac80211-ibss-fix-channel-type-enum-in-ieee80211_sta_join_ibss.patch
queue-4.9/cfg80211-fix-array-bounds-warning-in-fragment-copy.patch
queue-4.9/netfilter-ctnetlink-make-some-parameters-integer-to-avoid-enum-mismatch.patch
queue-4.9/mac80211-fix-clang-warning-about-constant-operand-in-logical-operation.patch
queue-4.9/cpumask-add-helper-cpumask_available.patch
This is a note to let you know that I've just added the patch titled
mm/vmscan.c: fix unsequenced modification and access warning
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mm-vmscan.c-fix-unsequenced-modification-and-access-warning.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From f2f43e566a02a3bdde0a65e6a2e88d707c212a29 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <nick.desaulniers(a)gmail.com>
Date: Thu, 6 Jul 2017 15:36:50 -0700
Subject: mm/vmscan.c: fix unsequenced modification and access warning
From: Nick Desaulniers <nick.desaulniers(a)gmail.com>
commit f2f43e566a02a3bdde0a65e6a2e88d707c212a29 upstream.
Clang and its -Wunsequenced emits a warning
mm/vmscan.c:2961:25: error: unsequenced modification and access to 'gfp_mask' [-Wunsequenced]
.gfp_mask = (gfp_mask = current_gfp_context(gfp_mask)),
^
While it is not clear to me whether the initialization code violates the
specification (6.7.8 par 19 (ISO/IEC 9899) looks like it disagrees) the
code is quite confusing and worth cleaning up anyway. Fix this by
reusing sc.gfp_mask rather than the updated input gfp_mask parameter.
Link: http://lkml.kernel.org/r/20170510154030.10720-1-nick.desaulniers@gmail.com
Signed-off-by: Nick Desaulniers <nick.desaulniers(a)gmail.com>
Acked-by: Michal Hocko <mhocko(a)suse.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds(a)linux-foundation.org>
[natechancellor: Adjust context due to abscence of 7dea19f9ee63]
Signed-off-by: Nathan Chancellor <natechancellor(a)gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
mm/vmscan.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2966,7 +2966,7 @@ unsigned long try_to_free_pages(struct z
unsigned long nr_reclaimed;
struct scan_control sc = {
.nr_to_reclaim = SWAP_CLUSTER_MAX,
- .gfp_mask = (gfp_mask = memalloc_noio_flags(gfp_mask)),
+ .gfp_mask = memalloc_noio_flags(gfp_mask),
.reclaim_idx = gfp_zone(gfp_mask),
.order = order,
.nodemask = nodemask,
@@ -2981,12 +2981,12 @@ unsigned long try_to_free_pages(struct z
* 1 is returned so that the page allocator does not OOM kill at this
* point.
*/
- if (throttle_direct_reclaim(gfp_mask, zonelist, nodemask))
+ if (throttle_direct_reclaim(sc.gfp_mask, zonelist, nodemask))
return 1;
trace_mm_vmscan_direct_reclaim_begin(order,
sc.may_writepage,
- gfp_mask,
+ sc.gfp_mask,
sc.reclaim_idx);
nr_reclaimed = do_try_to_free_pages(zonelist, &sc);
@@ -3749,16 +3749,15 @@ static int __node_reclaim(struct pglist_
const unsigned long nr_pages = 1 << order;
struct task_struct *p = current;
struct reclaim_state reclaim_state;
- int classzone_idx = gfp_zone(gfp_mask);
struct scan_control sc = {
.nr_to_reclaim = max(nr_pages, SWAP_CLUSTER_MAX),
- .gfp_mask = (gfp_mask = memalloc_noio_flags(gfp_mask)),
+ .gfp_mask = memalloc_noio_flags(gfp_mask),
.order = order,
.priority = NODE_RECLAIM_PRIORITY,
.may_writepage = !!(node_reclaim_mode & RECLAIM_WRITE),
.may_unmap = !!(node_reclaim_mode & RECLAIM_UNMAP),
.may_swap = 1,
- .reclaim_idx = classzone_idx,
+ .reclaim_idx = gfp_zone(gfp_mask),
};
cond_resched();
@@ -3768,7 +3767,7 @@ static int __node_reclaim(struct pglist_
* and RECLAIM_UNMAP.
*/
p->flags |= PF_MEMALLOC | PF_SWAPWRITE;
- lockdep_set_current_reclaim_state(gfp_mask);
+ lockdep_set_current_reclaim_state(sc.gfp_mask);
reclaim_state.reclaimed_slab = 0;
p->reclaim_state = &reclaim_state;
Patches currently in stable-queue which might be from nick.desaulniers(a)gmail.com are
queue-4.9/mm-vmscan.c-fix-unsequenced-modification-and-access-warning.patch
queue-4.9/input-mousedev-fix-implicit-conversion-warning.patch
This is a note to let you know that I've just added the patch titled
netfilter: ctnetlink: Make some parameters integer to avoid enum mismatch
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
netfilter-ctnetlink-make-some-parameters-integer-to-avoid-enum-mismatch.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From a2b7cbdd2559aff06cebc28a7150f81c307a90d3 Mon Sep 17 00:00:00 2001
From: Matthias Kaehlcke <mka(a)chromium.org>
Date: Wed, 19 Apr 2017 11:39:20 -0700
Subject: netfilter: ctnetlink: Make some parameters integer to avoid enum mismatch
From: Matthias Kaehlcke <mka(a)chromium.org>
commit a2b7cbdd2559aff06cebc28a7150f81c307a90d3 upstream.
Not all parameters passed to ctnetlink_parse_tuple() and
ctnetlink_exp_dump_tuple() match the enum type in the signatures of these
functions. Since this is intended change the argument type of to be an
unsigned integer value.
Signed-off-by: Matthias Kaehlcke <mka(a)chromium.org>
Signed-off-by: Pablo Neira Ayuso <pablo(a)netfilter.org>
Cc: Nathan Chancellor <natechancellor(a)gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/netfilter/nf_conntrack_netlink.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -1008,9 +1008,8 @@ static const struct nla_policy tuple_nla
static int
ctnetlink_parse_tuple(const struct nlattr * const cda[],
- struct nf_conntrack_tuple *tuple,
- enum ctattr_type type, u_int8_t l3num,
- struct nf_conntrack_zone *zone)
+ struct nf_conntrack_tuple *tuple, u32 type,
+ u_int8_t l3num, struct nf_conntrack_zone *zone)
{
struct nlattr *tb[CTA_TUPLE_MAX+1];
int err;
@@ -2409,7 +2408,7 @@ static struct nfnl_ct_hook ctnetlink_glu
static int ctnetlink_exp_dump_tuple(struct sk_buff *skb,
const struct nf_conntrack_tuple *tuple,
- enum ctattr_expect type)
+ u32 type)
{
struct nlattr *nest_parms;
Patches currently in stable-queue which might be from mka(a)chromium.org are
queue-4.9/dm-ioctl-remove-double-parentheses.patch
queue-4.9/arm64-avoid-overflow-in-va_start-and-page_offset.patch
queue-4.9/btrfs-remove-extra-parentheses-from-condition-in-copy_items.patch
queue-4.9/genirq-use-cpumask_available-for-check-of-cpumask-variable.patch
queue-4.9/nl80211-fix-enum-type-of-variable-in-nl80211_put_sta_rate.patch
queue-4.9/selinux-remove-redundant-check-for-unknown-labeling-behavior.patch
queue-4.9/fs-compat-remove-warning-from-compatible_ioctl.patch
queue-4.9/jiffies.h-declare-jiffies-and-jiffies_64-with-____cacheline_aligned_in_smp.patch
queue-4.9/selinux-remove-unnecessary-check-of-array-base-in-selinux_set_mapping.patch
queue-4.9/pci-make-pci_rom_address_mask-a-32-bit-constant.patch
queue-4.9/frv-declare-jiffies-to-be-located-in-the-.data-section.patch
queue-4.9/mac80211-ibss-fix-channel-type-enum-in-ieee80211_sta_join_ibss.patch
queue-4.9/cfg80211-fix-array-bounds-warning-in-fragment-copy.patch
queue-4.9/netfilter-ctnetlink-make-some-parameters-integer-to-avoid-enum-mismatch.patch
queue-4.9/mac80211-fix-clang-warning-about-constant-operand-in-logical-operation.patch
queue-4.9/cpumask-add-helper-cpumask_available.patch
This is a note to let you know that I've just added the patch titled
HID: sony: Use LED_CORE_SUSPENDRESUME
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
hid-sony-use-led_core_suspendresume.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 765a1077c85e5f2efcc43582f80caf43a052e903 Mon Sep 17 00:00:00 2001
From: Frank Praznik <frank.praznik(a)gmail.com>
Date: Wed, 8 Feb 2017 13:58:43 -0500
Subject: HID: sony: Use LED_CORE_SUSPENDRESUME
From: Frank Praznik <frank.praznik(a)gmail.com>
commit 765a1077c85e5f2efcc43582f80caf43a052e903 upstream.
The LED subsystem provides the LED_CORE_SUSPENDRESUME flag to handle
automatically turning off and restoring the state of device LEDs during
suspend/resume. Use this flag instead of saving and restoring the state
locally.
Signed-off-by: Frank Praznik <frank.praznik(a)gmail.com>
Signed-off-by: Jiri Kosina <jkosina(a)suse.cz>
Cc: Nathan Chancellor <natechancellor(a)gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/hid/hid-sony.c | 45 +++++++++++++++------------------------------
1 file changed, 15 insertions(+), 30 deletions(-)
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1056,7 +1056,6 @@ struct sony_sc {
u8 battery_charging;
u8 battery_capacity;
u8 led_state[MAX_LEDS];
- u8 resume_led_state[MAX_LEDS];
u8 led_delay_on[MAX_LEDS];
u8 led_delay_off[MAX_LEDS];
u8 led_count;
@@ -1793,6 +1792,7 @@ static int sony_leds_init(struct sony_sc
led->name = name;
led->brightness = sc->led_state[n];
led->max_brightness = max_brightness[n];
+ led->flags = LED_CORE_SUSPENDRESUME;
led->brightness_get = sony_led_get_brightness;
led->brightness_set = sony_led_set_brightness;
@@ -2509,47 +2509,32 @@ static void sony_remove(struct hid_devic
static int sony_suspend(struct hid_device *hdev, pm_message_t message)
{
- /*
- * On suspend save the current LED state,
- * stop running force-feedback and blank the LEDS.
- */
- if (SONY_LED_SUPPORT || SONY_FF_SUPPORT) {
- struct sony_sc *sc = hid_get_drvdata(hdev);
-
#ifdef CONFIG_SONY_FF
- sc->left = sc->right = 0;
-#endif
- memcpy(sc->resume_led_state, sc->led_state,
- sizeof(sc->resume_led_state));
- memset(sc->led_state, 0, sizeof(sc->led_state));
+ /* On suspend stop any running force-feedback events */
+ if (SONY_FF_SUPPORT) {
+ struct sony_sc *sc = hid_get_drvdata(hdev);
+ sc->left = sc->right = 0;
sony_send_output_report(sc);
}
+#endif
return 0;
}
static int sony_resume(struct hid_device *hdev)
{
- /* Restore the state of controller LEDs on resume */
- if (SONY_LED_SUPPORT) {
- struct sony_sc *sc = hid_get_drvdata(hdev);
-
- memcpy(sc->led_state, sc->resume_led_state,
- sizeof(sc->led_state));
-
- /*
- * The Sixaxis and navigation controllers on USB need to be
- * reinitialized on resume or they won't behave properly.
- */
- if ((sc->quirks & SIXAXIS_CONTROLLER_USB) ||
- (sc->quirks & NAVIGATION_CONTROLLER_USB)) {
- sixaxis_set_operational_usb(sc->hdev);
- sc->defer_initialization = 1;
- }
+ struct sony_sc *sc = hid_get_drvdata(hdev);
- sony_set_leds(sc);
+ /*
+ * The Sixaxis and navigation controllers on USB need to be
+ * reinitialized on resume or they won't behave properly.
+ */
+ if ((sc->quirks & SIXAXIS_CONTROLLER_USB) ||
+ (sc->quirks & NAVIGATION_CONTROLLER_USB)) {
+ sixaxis_set_operational_usb(sc->hdev);
+ sc->defer_initialization = 1;
}
return 0;
Patches currently in stable-queue which might be from frank.praznik(a)gmail.com are
queue-4.9/hid-sony-use-led_core_suspendresume.patch
This is a note to let you know that I've just added the patch titled
mac80211: ibss: Fix channel type enum in ieee80211_sta_join_ibss()
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mac80211-ibss-fix-channel-type-enum-in-ieee80211_sta_join_ibss.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From a4ac6f2e53e568a77a2eb3710efd99ca08634c0a Mon Sep 17 00:00:00 2001
From: Matthias Kaehlcke <mka(a)chromium.org>
Date: Mon, 17 Apr 2017 13:59:53 -0700
Subject: mac80211: ibss: Fix channel type enum in ieee80211_sta_join_ibss()
From: Matthias Kaehlcke <mka(a)chromium.org>
commit a4ac6f2e53e568a77a2eb3710efd99ca08634c0a upstream.
cfg80211_chandef_create() expects an 'enum nl80211_channel_type' as
channel type however in ieee80211_sta_join_ibss()
NL80211_CHAN_WIDTH_20_NOHT is passed in two occasions, which is of
the enum type 'nl80211_chan_width'. Change the value to NL80211_CHAN_NO_HT
(20 MHz, non-HT channel) of the channel type enum.
Signed-off-by: Matthias Kaehlcke <mka(a)chromium.org>
Signed-off-by: Johannes Berg <johannes.berg(a)intel.com>
Cc: Nathan Chancellor <natechancellor(a)gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/mac80211/ibss.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -427,7 +427,7 @@ static void ieee80211_sta_join_ibss(stru
case NL80211_CHAN_WIDTH_5:
case NL80211_CHAN_WIDTH_10:
cfg80211_chandef_create(&chandef, cbss->channel,
- NL80211_CHAN_WIDTH_20_NOHT);
+ NL80211_CHAN_NO_HT);
chandef.width = sdata->u.ibss.chandef.width;
break;
case NL80211_CHAN_WIDTH_80:
@@ -439,7 +439,7 @@ static void ieee80211_sta_join_ibss(stru
default:
/* fall back to 20 MHz for unsupported modes */
cfg80211_chandef_create(&chandef, cbss->channel,
- NL80211_CHAN_WIDTH_20_NOHT);
+ NL80211_CHAN_NO_HT);
break;
}
Patches currently in stable-queue which might be from mka(a)chromium.org are
queue-4.9/dm-ioctl-remove-double-parentheses.patch
queue-4.9/arm64-avoid-overflow-in-va_start-and-page_offset.patch
queue-4.9/btrfs-remove-extra-parentheses-from-condition-in-copy_items.patch
queue-4.9/genirq-use-cpumask_available-for-check-of-cpumask-variable.patch
queue-4.9/nl80211-fix-enum-type-of-variable-in-nl80211_put_sta_rate.patch
queue-4.9/selinux-remove-redundant-check-for-unknown-labeling-behavior.patch
queue-4.9/fs-compat-remove-warning-from-compatible_ioctl.patch
queue-4.9/jiffies.h-declare-jiffies-and-jiffies_64-with-____cacheline_aligned_in_smp.patch
queue-4.9/selinux-remove-unnecessary-check-of-array-base-in-selinux_set_mapping.patch
queue-4.9/pci-make-pci_rom_address_mask-a-32-bit-constant.patch
queue-4.9/frv-declare-jiffies-to-be-located-in-the-.data-section.patch
queue-4.9/mac80211-ibss-fix-channel-type-enum-in-ieee80211_sta_join_ibss.patch
queue-4.9/cfg80211-fix-array-bounds-warning-in-fragment-copy.patch
queue-4.9/netfilter-ctnetlink-make-some-parameters-integer-to-avoid-enum-mismatch.patch
queue-4.9/mac80211-fix-clang-warning-about-constant-operand-in-logical-operation.patch
queue-4.9/cpumask-add-helper-cpumask_available.patch
This is a note to let you know that I've just added the patch titled
mac80211: Fix clang warning about constant operand in logical operation
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mac80211-fix-clang-warning-about-constant-operand-in-logical-operation.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 93f56de259376d7e4fff2b2d104082e1fa66e237 Mon Sep 17 00:00:00 2001
From: Matthias Kaehlcke <mka(a)chromium.org>
Date: Thu, 6 Apr 2017 16:31:41 -0700
Subject: mac80211: Fix clang warning about constant operand in logical operation
From: Matthias Kaehlcke <mka(a)chromium.org>
commit 93f56de259376d7e4fff2b2d104082e1fa66e237 upstream.
When clang detects a non-boolean constant in a logical operation it
generates a 'constant-logical-operand' warning. In
ieee80211_try_rate_control_ops_get() the result of strlen(<const str>)
is used in a logical operation, clang resolves the expression to an
(integer) constant at compile time when clang's builtin strlen function
is used.
Change the condition to check for strlen() > 0 to make the constant
operand boolean and thus avoid the warning.
Signed-off-by: Matthias Kaehlcke <mka(a)chromium.org>
Signed-off-by: Johannes Berg <johannes.berg(a)intel.com>
Cc: Nathan Chancellor <natechancellor(a)gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/mac80211/rate.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -173,9 +173,11 @@ ieee80211_rate_control_ops_get(const cha
/* try default if specific alg requested but not found */
ops = ieee80211_try_rate_control_ops_get(ieee80211_default_rc_algo);
- /* try built-in one if specific alg requested but not found */
- if (!ops && strlen(CONFIG_MAC80211_RC_DEFAULT))
+ /* Note: check for > 0 is intentional to avoid clang warning */
+ if (!ops && (strlen(CONFIG_MAC80211_RC_DEFAULT) > 0))
+ /* try built-in one if specific alg requested but not found */
ops = ieee80211_try_rate_control_ops_get(CONFIG_MAC80211_RC_DEFAULT);
+
kernel_param_unlock(THIS_MODULE);
return ops;
Patches currently in stable-queue which might be from mka(a)chromium.org are
queue-4.9/dm-ioctl-remove-double-parentheses.patch
queue-4.9/arm64-avoid-overflow-in-va_start-and-page_offset.patch
queue-4.9/btrfs-remove-extra-parentheses-from-condition-in-copy_items.patch
queue-4.9/genirq-use-cpumask_available-for-check-of-cpumask-variable.patch
queue-4.9/nl80211-fix-enum-type-of-variable-in-nl80211_put_sta_rate.patch
queue-4.9/selinux-remove-redundant-check-for-unknown-labeling-behavior.patch
queue-4.9/fs-compat-remove-warning-from-compatible_ioctl.patch
queue-4.9/jiffies.h-declare-jiffies-and-jiffies_64-with-____cacheline_aligned_in_smp.patch
queue-4.9/selinux-remove-unnecessary-check-of-array-base-in-selinux_set_mapping.patch
queue-4.9/pci-make-pci_rom_address_mask-a-32-bit-constant.patch
queue-4.9/frv-declare-jiffies-to-be-located-in-the-.data-section.patch
queue-4.9/mac80211-ibss-fix-channel-type-enum-in-ieee80211_sta_join_ibss.patch
queue-4.9/cfg80211-fix-array-bounds-warning-in-fragment-copy.patch
queue-4.9/netfilter-ctnetlink-make-some-parameters-integer-to-avoid-enum-mismatch.patch
queue-4.9/mac80211-fix-clang-warning-about-constant-operand-in-logical-operation.patch
queue-4.9/cpumask-add-helper-cpumask_available.patch
This is a note to let you know that I've just added the patch titled
btrfs: Remove extra parentheses from condition in copy_items()
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
btrfs-remove-extra-parentheses-from-condition-in-copy_items.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 0dde10bed2c44a4024eb446cc72fe4e0cb97ec06 Mon Sep 17 00:00:00 2001
From: Matthias Kaehlcke <mka(a)chromium.org>
Date: Thu, 27 Jul 2017 14:30:23 -0700
Subject: btrfs: Remove extra parentheses from condition in copy_items()
From: Matthias Kaehlcke <mka(a)chromium.org>
commit 0dde10bed2c44a4024eb446cc72fe4e0cb97ec06 upstream.
There is no need for the extra pair of parentheses, remove it. This
fixes the following warning when building with clang:
fs/btrfs/tree-log.c:3694:10: warning: equality comparison with extraneous
parentheses [-Wparentheses-equality]
if ((i == (nr - 1)))
~~^~~~~~~~~~~
Also remove the unnecessary parentheses around the substraction.
Signed-off-by: Matthias Kaehlcke <mka(a)chromium.org>
Signed-off-by: David Sterba <dsterba(a)suse.com>
Cc: Nathan Chancellor <natechancellor(a)gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
fs/btrfs/tree-log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -3664,7 +3664,7 @@ static noinline int copy_items(struct bt
src_offset = btrfs_item_ptr_offset(src, start_slot + i);
- if ((i == (nr - 1)))
+ if (i == nr - 1)
last_key = ins_keys[i];
if (ins_keys[i].type == BTRFS_INODE_ITEM_KEY) {
Patches currently in stable-queue which might be from mka(a)chromium.org are
queue-4.9/dm-ioctl-remove-double-parentheses.patch
queue-4.9/arm64-avoid-overflow-in-va_start-and-page_offset.patch
queue-4.9/btrfs-remove-extra-parentheses-from-condition-in-copy_items.patch
queue-4.9/genirq-use-cpumask_available-for-check-of-cpumask-variable.patch
queue-4.9/nl80211-fix-enum-type-of-variable-in-nl80211_put_sta_rate.patch
queue-4.9/selinux-remove-redundant-check-for-unknown-labeling-behavior.patch
queue-4.9/fs-compat-remove-warning-from-compatible_ioctl.patch
queue-4.9/jiffies.h-declare-jiffies-and-jiffies_64-with-____cacheline_aligned_in_smp.patch
queue-4.9/selinux-remove-unnecessary-check-of-array-base-in-selinux_set_mapping.patch
queue-4.9/pci-make-pci_rom_address_mask-a-32-bit-constant.patch
queue-4.9/frv-declare-jiffies-to-be-located-in-the-.data-section.patch
queue-4.9/mac80211-ibss-fix-channel-type-enum-in-ieee80211_sta_join_ibss.patch
queue-4.9/cfg80211-fix-array-bounds-warning-in-fragment-copy.patch
queue-4.9/netfilter-ctnetlink-make-some-parameters-integer-to-avoid-enum-mismatch.patch
queue-4.9/mac80211-fix-clang-warning-about-constant-operand-in-logical-operation.patch
queue-4.9/cpumask-add-helper-cpumask_available.patch