OSDN Git Service

uclinux-h8/linux.git
8 years agostaging: android: Fixed line over 80 char
Jignesh R Patel [Tue, 28 Jul 2015 10:49:36 +0000 (16:19 +0530)]
staging: android: Fixed line over 80 char

Fixes the following checkpatch warning:
Warning: Line over 80 characters

Signed-off-by: Jignesh R Patel <jigneshpatel0103@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging:dgap :Compression of lines for immediate return
Shraddha Barke [Mon, 27 Jul 2015 18:00:52 +0000 (23:30 +0530)]
Staging:dgap :Compression of lines for immediate return

This patch compresses two lines into a single line
if immediate return statement is found. Remove variable rc as
it is no longer needed.

It is done using script Coccinelle. And coccinelle uses the following
semantic patch for this compression function:

@@
type T;
identifier i,f;
constant C;
@@
- T i;
  ...when != i
     when strict
(
  return -C;
|
- i =
+ return
     f(...);
- return i;
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: Fix checkpatch issue with comma in r819xU_firmware.c
Freeman Zhang [Mon, 27 Jul 2015 06:37:25 +0000 (14:37 +0800)]
staging: rtl8192u: Fix checkpatch issue with comma in r819xU_firmware.c

Add space after ',' to fix the error message provided by checkpatch.pl:
ERROR: space required after that ','

Signed-off-by: Freeman Zhang <freeman.zhang1992@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging : android :Replace comma with a semicolon
Shraddha Barke [Mon, 27 Jul 2015 10:06:26 +0000 (15:36 +0530)]
Staging : android :Replace comma with a semicolon

Replace comma between expression statements by a semicolon.
The semantic patch used is as follows:

@@
expression e1,e2;
@@
e1
- ,
+ ;
e2;

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: Add blank line after variable declarations.
Ciprian Manea [Sun, 26 Jul 2015 21:26:18 +0000 (22:26 +0100)]
staging: slicoss: Add blank line after variable declarations.

This patch fixes the checkpatch.pl warning:

WARNING: Missing a blank line after declarations
+ unsigned long flags;
+ pshmem = (struct slic_shmem *)(unsigned long)

Signed-off-by: Ciprian Manea <ciprian.manea.cm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/xgifb: fix dumpVGAReg compile error if DEBUG is set
Peter Huewe [Fri, 24 Jul 2015 23:59:08 +0000 (01:59 +0200)]
staging/xgifb: fix dumpVGAReg compile error if DEBUG is set

If DEBUG is set dumpVGAReg is called and tries to access
XGISR which is defined as (xgifb_info->dev_info.P3c4)
which is not known within this function.

-> add as parameter to dumpVGAReg so xgifb_info becomes known

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon: add missing blank line after declarations
Kevin Darbyshire-Bryant [Sat, 25 Jul 2015 09:48:28 +0000 (10:48 +0100)]
staging: octeon: add missing blank line after declarations

Fixes checkpatch.pl
WARNING: Missing a blank line after delarations

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: dgnc: dgnc_driver.h: remove unnecessary comments
Navy Cheng [Mon, 27 Jul 2015 08:09:35 +0000 (16:09 +0800)]
Staging: dgnc: dgnc_driver.h: remove unnecessary comments

The public headers is well known by others and the redundant commits make
the code mess. Remove the comments of the public headers to make the code
tidy.

Signed-off-by: Navy Cheng <navych@126.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visornic - consolidate+simplify xmit watermark checks
Tim Sell [Tue, 28 Jul 2015 16:29:11 +0000 (12:29 -0400)]
staging: unisys: visornic - consolidate+simplify xmit watermark checks

The code that tests for high and low xmit watermarks was consolidatedand
simplified. The output behavior should be identical, with the exception
of an off-by-one error being corrected in the tests done when the counters
overflowed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visornic: enable skb->len error-check, remove DEBUG blocks
Tim Sell [Tue, 28 Jul 2015 16:29:10 +0000 (12:29 -0400)]
staging: unisys: visornic: enable skb->len error-check, remove DEBUG blocks

* A skb->len error-check was enabled (removed from a "#ifdef DEBUG" block).
* Several unneeded "#ifdef DEBUG" blocks were removed.
* A dev_err() was converted to the more-appropriate netdev_err().

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visornic_resume needs to mirror _serverdown_complete
Tim Sell [Tue, 28 Jul 2015 16:29:09 +0000 (12:29 -0400)]
staging: unisys: visornic_resume needs to mirror _serverdown_complete

Previously we simplified the serverdown function to basically turn it
into a dev_close(), but missed the analogous logic in visornic_resume()
(which is essentially the "book-end" of visornic_serverdown_complete()).
As a result, during IO partition recovery, the nic would go closed when
the IO partition went away, but would never be opened again when the IO
partition came back.

This patch changes visornic_resume() to use dev_open(), so that it once
again plays nicely with visornic_serverdown_complete().  Because
dev_open() forces us into the visornic_open() path, other logic in
visornic_resume() was no longer necessary, and lended to simplifying
visornic_resume() even more.

Fixes: 36645d72a377 ("staging: unisys: simplify visornic_serverdown_complete")
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visornic - correctly reset flag prior to send_enbdis()
Tim Sell [Tue, 28 Jul 2015 16:29:08 +0000 (12:29 -0400)]
staging: unisys: visornic - correctly reset flag prior to send_enbdis()

Because devdata->enab_dis_acked is the flag used to determine whether an
enable/disable operation to the IO partition has completed, it should
always be cleared prior to initiating the operation.  The call added to
visornic_enable_with_timeout() added in this patch makes the usage there
consistent with visornic_disable_with_timeout().

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visornic - prevent lock recursion after IO recovery
Tim Sell [Fri, 31 Jul 2015 17:21:33 +0000 (13:21 -0400)]
staging: unisys: visornic - prevent lock recursion after IO recovery

In the patch which changed the serverdown logic to by synchronous, we
were
mistakenly holding on to devdata->priv_lock in the call to
visornic_serverdown_complete(), which ultimately ended up recursively
attempting to grab the same lock via the path:

    --> dev_close
        --> visornic_close()
            --> visornic_disable_with_timeout()

Evidence:

    BUG: spinlock recursion on CPU#0, kworker/u2:0/1567
     lock: 0xffff88002d7e4c90, .magic: dead4ead, .owner: kworker/
     .owner_cpu: 0
    CPU: 0 PID: 1567 Comm: kworker/u2:0 Tainted: G        WC
         4.2.0-rc3-ARCH+ #60
    Hardware name: Dell Inc. PowerEdge T110/ , BIOS 1.23 12/15/2009
    Workqueue: visorchipset_controlvm controlvm_periodic_work [visorbus]
     ffff8800216a9380 ffff88002d167878 ffffffff81476874 000000000000061f
     ffff88002d7e4c90 ffff88002d167898 ffffffff8109e2bc ffff88002d7e4c90
     ffffffff81763d7c ffff88002d1678b8 ffffffff8109e330 ffff88002d7e4c90
    Call Trace:
     [<ffffffff81476874>] dump_stack+0x4f/0x73
     [<ffffffff8109e2bc>] spin_dump+0x7c/0xc0
     [<ffffffff8109e330>] spin_bug+0x30/0x40
     [<ffffffff8109e547>] do_raw_spin_lock+0x127/0x140
     [<ffffffff8147bf8b>] _raw_spin_lock_irqsave+0x4b/0x60
     [<ffffffffa0168a5c>] ? visornic_disable_with_timeout.clone.2+0x3c/
                          [visornic]
     [<ffffffff8147c639>] ? _raw_spin_unlock_bh+0x39/0x40
     [<ffffffffa0168a5c>] visornic_disable_with_timeout.clone.2+0x3c/
                          [visornic]
     [<ffffffffa0168c6e>] visornic_close+0xe/0x20 [visornic]
     [<ffffffff813ae8d2>] __dev_close_many+0x92/0xe0
     [<ffffffff813ae9ea>] dev_close_many+0x7a/0x110
     [<ffffffff81097556>] ? down+0x16/0x50
     [<ffffffff813af01f>] dev_close+0x3f/0x50
     [<ffffffffa0166b61>] visornic_serverdown+0x91/0x1a0 [visornic]
     [<ffffffffa0155760>] ? device_changestate_responder.clone.
                          [visorbus]
     [<ffffffffa0166c85>] visornic_pause+0x15/0x20 [visornic]
     [<ffffffffa015101f>] initiate_chipset_device_pause_resume+0x9f/0xe0
                          [visorbus]
     [<ffffffffa0151093>] chipset_device_pause+0x13/0x20 [visorbus]
     [<ffffffffa0153cbb>] device_epilog+0x12b/0x1a0 [visorbus]
     [<ffffffffa015506b>] handle_command+0x72b/0x970 [visorbus]
     [<ffffffffa015214e>] ? visorchannel_signalremove+0x6e/0x80
[visorbus]
     [<ffffffffa0155521>] controlvm_periodic_work+0x271/0x420 [visorbus]
     [<ffffffff8106cb52>] process_one_work+0x1d2/0x540
     [<ffffffff8106cab9>] ? process_one_work+0x139/0x540
     [<ffffffff814771b7>] ? __schedule+0x807/0xc30
     [<ffffffff8106cf57>] worker_thread+0x57/0x4c0
     [<ffffffff8106cf00>] ? process_scheduled_works+0x40/0x40
     [<ffffffff8106cf00>] ? process_scheduled_works+0x40/0x40
     [<ffffffff81073b19>] kthread+0xe9/0x110
     [<ffffffff81073a30>] ? __init_kthread_worker+0x70/0x70
     [<ffffffff8147cddf>] ret_from_fork+0x3f/0x70
     [<ffffffff81073a30>] ? __init_kthread_worker+0x70/0x70
    BUG: spinlock lockup suspected on CPU#0, kworker/u2:0/1567

Fixes: f2b70efaf48f ("staging: unisys: Make serverdown synchronous")

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: avoid format string parsing
Kees Cook [Tue, 28 Jul 2015 16:29:06 +0000 (12:29 -0400)]
staging: unisys: avoid format string parsing

This makes sure the kthread name can't be parsed as a format string.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers, staging, unisys Add modalias files to visorbus devices
Prarit Bhargava [Fri, 24 Jul 2015 16:06:53 +0000 (12:06 -0400)]
drivers, staging, unisys Add modalias files to visorbus devices

This patch adds modalias files that export the device UUID type to sysfs
so that udev can autoload the appropriate device driver on demand.  Note
that is required a minor name change to the channel device sysfs files
which are currently named visorbus_dev_groups, and are now named
visorbus_channel_groups.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: add UUID strings to channel_guid.h
Prarit Bhargava [Fri, 24 Jul 2015 16:06:52 +0000 (12:06 -0400)]
staging: unisys: add UUID strings to channel_guid.h

Define additional strings for module loading code ease of use.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers, staging, unisys, cleanup channel_guid.h
Prarit Bhargava [Fri, 24 Jul 2015 16:06:51 +0000 (12:06 -0400)]
drivers, staging, unisys, cleanup channel_guid.h

This file has a lot of dead comments and needs to be cleaned up.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu/hal: Fixed code indentation warning detected with checkpatch.pl
Mayank Bareja [Tue, 28 Jul 2015 05:50:12 +0000 (05:50 +0000)]
Staging: rtl8188eu/hal: Fixed code indentation warning detected with checkpatch.pl

fixed code indentation warning as reported by checkpatch.pl.
Replaced Spaces with Tabs.

Signed-off-by: Mayank Bareja <mbareja@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging : rtl8188eu : os_dep : Compression of lines for immediate return
Shraddha Barke [Mon, 27 Jul 2015 13:37:57 +0000 (19:07 +0530)]
Staging : rtl8188eu : os_dep : Compression of lines for immediate return

This patch compresses two lines into a single line if immediate return is
found. Also remove variable ret as it is no longer needed.
Semantic patch used for this is as follows:

@@
type T;
identifier i,f;
constant C;
@@
- T i;
  ...when != i
     when strict
(
  return -C;
|
- i =
+ return
     f(...);
- return i;
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: don't duplicate ieee80211 WLAN_HT_CAP_SM_PS_* constants
Jakub Sitnicki [Wed, 29 Jul 2015 08:15:18 +0000 (10:15 +0200)]
staging: rtl8188eu: don't duplicate ieee80211 WLAN_HT_CAP_SM_PS_* constants

linux/ieee80211.h already defines constants for spatial multiplexing
power save modes.  Remove the duplicated definitions.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: don't duplicate ieee80211 WLAN_AUTH_* constants
Jakub Sitnicki [Wed, 29 Jul 2015 08:15:17 +0000 (10:15 +0200)]
staging: rtl8188eu: don't duplicate ieee80211 WLAN_AUTH_* constants

linux/ieee80211.h already defines constants for authentication
algorithms.  Remove the duplicated definitions.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: wrap a long if condition and remove extra parenthesis
Jakub Sitnicki [Wed, 29 Jul 2015 08:15:16 +0000 (10:15 +0200)]
staging: rtl8188eu: wrap a long if condition and remove extra parenthesis

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
Jakub Sitnicki [Wed, 29 Jul 2015 08:15:15 +0000 (10:15 +0200)]
staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants

linux/ieee80211.h already defines constants for information element IDs.
Resolve discrepancies in naming and remove the duplicated definitions.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu: fixed newlines after declarations
Dave Perez [Thu, 30 Jul 2015 01:50:30 +0000 (21:50 -0400)]
Staging: rtl8188eu: fixed newlines after declarations

This is a patch to the rtw_debug.c file that fixes styling errors relating to
new lines after variable declarations.

Signed-off-by: Dave Perez <dave@daveperez.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/llite: Don't set page writeback on non-dirty page
Oleg Drokin [Thu, 30 Jul 2015 22:49:55 +0000 (18:49 -0400)]
staging/lustre/llite: Don't set page writeback on non-dirty page

New writeback changes in 4.2-RC1 have exposed that we incorrectly
set page_writeback on a page that is being written synchronously,
which aside from this new crash (dereference of NULL inode->i_wb
from set_page_writeback) likely threw off some related page
statistics in the past.

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000138
 IP: [<ffffffff8140d90a>] __percpu_counter_add+0x1a/0x80
 PGD 0
 Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
 Modules linked in: osc(C) lmv(C) fld(C) mgc(C) lustre(C) mdc(C) fid(C) lov(C) ksocklnd(C) ptlrpc(C) obdclass(C) lnet(C) libcfs(C) loop sha512_generic crc32 rpcsec_gss_krb5 microcode joydev i2c_piix4 acpi_cpufreq pcspkr nfsd syscopyarea sysfillrect sysimgblt drm_kms_helper ttm drm serio_raw virtio_blk [last unloaded: libcfs]
 CPU: 0 PID: 13328 Comm: cvs Tainted: G         C      4.2.0-rc1-vm-nfs+ #30
 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
 task: ffff8800cc98a400 ti: ffff8801157e8000 task.ti: ffff8801157e8000
 RIP: 0010:[<ffffffff8140d90a>]  [<ffffffff8140d90a>] __percpu_counter_add+0x1a/0x80
 RSP: 0018:ffff8801157eb698  EFLAGS: 00010086
 RAX: 0000000000000003 RBX: ffffea0002b91cc0 RCX: 000000000000001a
 RDX: 0000000000000020 RSI: 0000000000000001 RDI: 00000000000000e8
 RBP: ffff8801157eb6b8 R08: 0000000000000001 R09: 0000000000000000
 R10: 0000000000000000 R11: 0000000000000000 R12: 00000000000000e8
 R13: 0000000000000001 R14: ffff8800673587a8 R15: ffff8800673589b0
 FS:  00007f6718b89800(0000) GS:ffff88011f400000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 0000000000000138 CR3: 000000009d51c000 CR4: 00000000000007f0
 Stack:
  ffffffff811919e2 ffffea0002b91cc0 ffff880067358998 ffff880119419800
  ffff8801157eb718 ffffffff81191a58 ffff8801157eb788 0000000000000282
  ffff8800ce5ce920 0000000000000000 ffff8800a525af80 ffff880053f68f10
 Call Trace:
  [<ffffffff811919e2>] ? __test_set_page_writeback+0x72/0x240
  [<ffffffff81191a58>] __test_set_page_writeback+0xe8/0x240
  [<ffffffffa04e7a13>] vvp_page_prep_write+0x33/0xb0 [lustre]
  [<ffffffffa028ad87>] cl_page_invoke+0x57/0x90 [obdclass]
  [<ffffffffa028cc8d>] cl_page_prep+0x2d/0x180 [obdclass]
  [<ffffffffa0545d84>] osc_io_submit+0x134/0x4a0 [osc]
  [<ffffffffa02933a3>] cl_io_submit_rw+0x53/0xb0 [obdclass]
  [<ffffffffa0483635>] lov_io_submit+0x3a5/0x570 [lov]
  [<ffffffff810cb7bb>] ? lockdep_init_map+0x5b/0x6d0
  [<ffffffffa02933a3>] cl_io_submit_rw+0x53/0xb0 [obdclass]
  [<ffffffffa029428d>] cl_io_submit_sync+0xed/0x1c0 [obdclass]
  [<ffffffffa04e881d>] vvp_page_sync_io.isra.15+0x4d/0x100 [lustre]
  [<ffffffffa028dd2f>] ? cl_page_clip+0xff/0x130 [obdclass]
  [<ffffffffa04e9f38>] vvp_io_commit_write+0x448/0x500 [lustre]
  [<ffffffffa02939fa>] cl_io_commit_write+0x9a/0x130 [obdclass]
  [<ffffffffa04cb222>] ll_commit_write+0xc2/0x230 [lustre]
  [<ffffffffa04dbdaa>] ll_write_end+0x2a/0x50 [lustre]
  [<ffffffff811851ba>] generic_perform_write+0xfa/0x1b0
  [<ffffffff8121fd2e>] ? dentry_needs_remove_privs.part.16+0x1e/0x30
  [<ffffffff811877d0>] __generic_file_write_iter+0x190/0x1f0
  [<ffffffff8118791a>] generic_file_write_iter+0xea/0x1e0
  [<ffffffffa04e8dd0>] vvp_io_write_start+0xa0/0x1e0 [lustre]
  [<ffffffffa0292469>] cl_io_start+0x49/0x80 [obdclass]
  [<ffffffffa0294803>] cl_io_loop+0x73/0xd0 [obdclass]
  [<ffffffffa04b4ebf>] ll_file_io_generic+0x45f/0x4b0 [lustre]
  [<ffffffffa04b504c>] ll_file_write_iter+0x6c/0xc0 [lustre]
  [<ffffffff8120330a>] __vfs_write+0xaa/0xe0
  [<ffffffff81203969>] vfs_write+0xa9/0x190
  [<ffffffff812046c9>] SyS_write+0x49/0xa0
  [<ffffffff81796572>] entry_SYSCALL_64_fastpath+0x16/0x7a
 Code: 5b 41 5c 41 5d 41 5e 5d c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 55 41 54 53 49 89 fc 49 89 f5 48 83 ec 08 65 ff 05 8e d1 bf 7e <48> 8b 47 50 48 63 ca 65 8b 18 48 63 db 48 01 f3 48 39 cb 7d 0a

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/15610
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6854
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: drop redundant check
Viresh Kumar [Fri, 31 Jul 2015 11:02:43 +0000 (16:32 +0530)]
staging: lustre: drop redundant check

There is no need to verify that its an error, as we are anyway going to
match the error value to -ENOENT.  Drop the redundant check.

Reported-by: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: use ATTR_OPEN directly, remove ATTR_RAW
Oleg Drokin [Thu, 30 Jul 2015 22:28:04 +0000 (18:28 -0400)]
staging/lustre: use ATTR_OPEN directly, remove ATTR_RAW

ATTR_RAW is unused.
No point in redefining ATTR_OPEN as ATTR_FROM_OPEN

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: ATTR_TIMES_SET is always defined, so don't check it
Oleg Drokin [Thu, 30 Jul 2015 22:28:02 +0000 (18:28 -0400)]
staging/lustre: ATTR_TIMES_SET is always defined, so don't check it

Remove ATTR_TIMES_SET check as it's always present, move
the mask of times define close to where it's used.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: replace ll_umode_t with umode_t
Oleg Drokin [Thu, 30 Jul 2015 22:27:59 +0000 (18:27 -0400)]
staging/lustre: replace ll_umode_t with umode_t

umode_t is what we need anyway, so replace all users
and drop the define.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: remove *hw_segments compat defines
Oleg Drokin [Thu, 30 Jul 2015 22:27:56 +0000 (18:27 -0400)]
staging/lustre: remove *hw_segments compat defines

queue_max_phys_segments, queue_max_hw_segments and bio_hw_segments
are not used anywhere in the client code, so remove them

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Drop SLAB_DESTROY_BY_RCU redefine, it's always defined
Oleg Drokin [Thu, 30 Jul 2015 22:27:55 +0000 (18:27 -0400)]
staging/lustre: Drop SLAB_DESTROY_BY_RCU redefine, it's always defined

SLAB_DESTROY_BY_RCU is always defined in kernel slab.h, so
no point in checking for it.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Drop FS_HAS_FIEMAP compat macro
Oleg Drokin [Thu, 30 Jul 2015 22:27:54 +0000 (18:27 -0400)]
staging/lustre: Drop FS_HAS_FIEMAP compat macro

FS_HAS_FIEMAP was some sort of old RHEL5 construct that's not
really important anymore

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: get rid of cfs_bio_* compat macroses
Oleg Drokin [Thu, 30 Jul 2015 22:27:53 +0000 (18:27 -0400)]
staging/lustre: get rid of cfs_bio_* compat macroses

This replaces cfs_bio_io_error with direct calls to bio_io_error
and cfs_bio_end_io with bio_end_io

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Remove unused ll_vfs_* compat defines
Oleg Drokin [Thu, 30 Jul 2015 22:27:52 +0000 (18:27 -0400)]
staging/lustre: Remove unused ll_vfs_* compat defines

Lustre defines quite a bit of those compatibility defines
duplicating kernel vfs api, but they are not actually used
in the client so remove them all and also ll_dirty_inode,
ll_security_inode_unlink and cfs_path_put

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: Drop unnecessary cast
Shraddha Barke [Mon, 27 Jul 2015 16:50:35 +0000 (22:20 +0530)]
Staging: lustre: Drop unnecessary cast

This patch does away with the cast on void * as it is unnecessary.

Semantic patch used is as follows:

@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: added a space between concatenated strings
Mario Bambagini [Tue, 28 Jul 2015 20:08:52 +0000 (22:08 +0200)]
staging: lustre: added a space between concatenated strings

A space has been inserted between two concatenated strings as required from
checkpatch.pl

These two updates do not lead to any problem as DFID is defined as a
string in ./drivers/staging/lustre/lustre/include/lustre/lustre_user.h

The script checkpatch.pl does not return any other warning/error.

Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: modified comparisons against NULL
Mario Bambagini [Tue, 28 Jul 2015 20:08:51 +0000 (22:08 +0200)]
staging: lustre: modified comparisons against NULL

The explicit comparisons against NULL has been modified to be shorter.

Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: fixed bad alignment
Mario Bambagini [Tue, 28 Jul 2015 20:08:50 +0000 (22:08 +0200)]
staging: lustre: fixed bad alignment

This patch fixes 7 bad alignments. When a line is split on
more than one line, the other lines must be aligned with
paranthesis.

Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: fixed comments without */ on a new line
Mario Bambagini [Tue, 28 Jul 2015 20:08:49 +0000 (22:08 +0200)]
staging: lustre: fixed comments without */ on a new line

This patch fixes 4 comments without */ on a new line

Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: fixed lines longer than 80 chars
Mario Bambagini [Tue, 28 Jul 2015 20:08:48 +0000 (22:08 +0200)]
staging: lustre: fixed lines longer than 80 chars

this set of patches fixes several code style problems:
-patch 1: lines with more than 80 chars
-patch 2: comments without */ on a separate line
-patch 3: bad alignment of lines split on more than one line
-patch 4: modified comparisons against NULL
-patch 5: added spaces between concatenated strings

This patch fixes 2 lines longer than 80 chars

The first one is a function whose argument has been moved to next line.
The second one is a comment split on two lines

Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Remove unnecessary braces {} for single statement blocks
Pan Li [Mon, 27 Jul 2015 05:52:48 +0000 (13:52 +0800)]
staging: lustre: Remove unnecessary braces {} for single statement blocks

Remove unnecessary braces {} for single line statement blocks.

Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Remove a trailing */ of a separate line.
Pan Li [Mon, 27 Jul 2015 05:50:34 +0000 (13:50 +0800)]
staging: lustre: Remove a trailing */ of a separate line.

Remove a trailing */ of a separate comments block line.

Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Add a blank line after declarations.
Pan Li [Mon, 27 Jul 2015 05:50:09 +0000 (13:50 +0800)]
staging: lustre: Add a blank line after declarations.

Add a blank line after local variable declarations.

Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Adjust code indent for macro and tail blackslash
Pan Li [Mon, 27 Jul 2015 05:49:11 +0000 (13:49 +0800)]
staging: lustre: Adjust code indent for macro and tail blackslash

Adjust code indent for macro with tab, as well as tail blackslash.

Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Replace spaces at the start of a line.
Pan Li [Mon, 27 Jul 2015 05:48:10 +0000 (13:48 +0800)]
staging: lustre: Replace spaces at the start of a line.

Replace the spaces at the start of a line with tab for indent.

Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging : wilc1000: Remove braces for single statement blocks
Shraddha Barke [Wed, 29 Jul 2015 06:48:58 +0000 (12:18 +0530)]
Staging : wilc1000: Remove braces for single statement blocks

This patch fixes the following checkpatch.pl warning:

WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unnecessary spcae
Kim, Leo [Tue, 28 Jul 2015 08:47:39 +0000 (17:47 +0900)]
staging: wilc1000: remove unnecessary spcae

This patch removes the warnings reported by checkpatch.pl on
space prohibited between function name and open parenthesis '('

Signed-off-by: Kim, Leo <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove warnings on the multiple blank lines uses
Kim, Leo [Tue, 28 Jul 2015 08:47:38 +0000 (17:47 +0900)]
staging: wilc1000: remove warnings on the multiple blank lines uses

This patch removes the warnings reported by checkpatch.pl for using
multiple blank lines.

Signed-off-by: Kim, Leo <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove braces {} for single statement blocks
Kim, Leo [Tue, 28 Jul 2015 08:47:37 +0000 (17:47 +0900)]
staging: wilc1000: remove braces {} for single statement blocks

This patch removes the warnings reported by checkpatch.pl on
braces {} not necessary for the single statement blocks.

Signed-off-by: Kim, Leo <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unnecessary inner braces
Tony Cho [Tue, 28 Jul 2015 08:47:35 +0000 (17:47 +0900)]
staging: wilc1000: remove unnecessary inner braces

This patch removes unnecessary inner braces.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove warnings on unnecessary braces
Tony Cho [Tue, 28 Jul 2015 08:47:33 +0000 (17:47 +0900)]
staging: wilc1000: remove warnings on unnecessary braces

This patch removes the warnings reported by checkpatch.pl on the braces
{} not necessary for any arm of this statement.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: alignment should match open parenthesis
Jude.Lee [Tue, 28 Jul 2015 08:47:31 +0000 (17:47 +0900)]
staging: wilc1000: alignment should match open parenthesis

This patch fixes the checks reported by checkpatch.pl
alignment should match open parenthesis

Signed-off-by: Jude.Lee <jude.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove multiple blank lines
Jude.Lee [Tue, 28 Jul 2015 08:47:30 +0000 (17:47 +0900)]
staging: wilc1000: remove multiple blank lines

This patch removes the warnings reported by checkpatch.pl for using
multiple blank lines.

Signed-off-by: Jude.Lee <jude.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove a dead preprocessor conditionals
Tony Cho [Tue, 28 Jul 2015 08:47:27 +0000 (17:47 +0900)]
staging: wilc1000: remove a dead preprocessor conditionals

This patch removes the preprocessor conditionals which are related to
the WILC1000_SINGLE_TRANSFER definition becasue this is not used.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove preprocessor conditionals unused
Tony Cho [Tue, 28 Jul 2015 08:47:26 +0000 (17:47 +0900)]
staging: wilc1000: remove preprocessor conditionals unused

This patch removes unused preprocessor conditionals for the
PLAT_AML8726_M3_BACKUP and PLAT_AML8726_M3 which are not used and so
dead codes. They are also platform-dependent codes.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove the warnings on unnecessary braces
Tony Cho [Tue, 28 Jul 2015 08:47:25 +0000 (17:47 +0900)]
staging: wilc1000: remove the warnings on unnecessary braces

This patch removes the warnings reported by checkpatch.pl on {} not
necessary for the single statement blocks.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove the warnings on missing blank line
Tony Cho [Tue, 28 Jul 2015 08:47:24 +0000 (17:47 +0900)]
staging: wilc1000: remove the warnings on missing blank line

This patch removes the warnings reported by checkpatch.pl on missing a blank
line after declaration.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove warnings on the multiple line uses
Tony Cho [Tue, 28 Jul 2015 08:47:23 +0000 (17:47 +0900)]
staging: wilc1000: remove warnings on the multiple line uses

This patch removes the warnings reported by checkpatch.pl for using
multiple blank lines.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove dead codes related to SIMULATION
Tony Cho [Tue, 28 Jul 2015 08:47:22 +0000 (17:47 +0900)]
staging: wilc1000: remove dead codes related to SIMULATION

This patch removes preprocessor conditionals (#ifdef or #ifndef) related
to SIMULATION definition from the codes becasue that SIMULATION feature is not
used anymore.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: describe the config symbol fully
Tony Cho [Tue, 28 Jul 2015 08:47:21 +0000 (17:47 +0900)]
staging: wilc1000: describe the config symbol fully

This patch removes the warnings reported by checkpatch.pl on the short
description for the config symbol in the Kconfig by adding more comments
to describe the config symbol in more detail.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unnecessary files
Tony Cho [Tue, 28 Jul 2015 08:47:20 +0000 (17:47 +0900)]
staging: wilc1000: remove unnecessary files

This patch removes the following files which are not used anymore.
- fifo_buffer.c
- fifo_buffer.h
- coreconfigsimulator.h
- wilc_wfi_netdevice.c

Signed-off-by: Robin Hwang <robin.hwang@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: fix aim-network build errors
Randy Dunlap [Tue, 28 Jul 2015 17:45:07 +0000 (10:45 -0700)]
staging: most: fix aim-network build errors

Fix build errors when CONFIG_NET is not enabled by making the driver
depend on NET.
Also correct the loadable module name.

ERROR: "__netdev_alloc_skb" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "netif_rx" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "netif_tx_wake_queue" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "free_netdev" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "register_netdev" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "kfree_skb" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "alloc_netdev_mqs" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "eth_type_trans" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "ether_setup" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "unregister_netdev" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "skb_put" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "eth_mac_addr" [drivers/staging/most/aim-network/aim_network.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Cc: Michael Fabry <Michael.Fabry@microchip.com>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: most: fix passing a potential null pointer
Christian Gromm [Tue, 28 Jul 2015 15:16:11 +0000 (17:16 +0200)]
Staging: most: fix passing a potential null pointer

This patch fixes passing of a potential null pointer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: most: fix dereferencing freed memory
Christian Gromm [Tue, 28 Jul 2015 15:16:10 +0000 (17:16 +0200)]
Staging: most: fix dereferencing freed memory

This patch fixes the dereferencing of freed memory.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: most: fix snprintf() is printing too much
Christian Gromm [Tue, 28 Jul 2015 15:16:09 +0000 (17:16 +0200)]
Staging: most: fix snprintf() is printing too much

This patch prevents snprintf from exceeding a given buffer size.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: core.c: remove semicolon at the end of define statement
Chaehyun Lim [Mon, 27 Jul 2015 01:31:09 +0000 (10:31 +0900)]
staging: most: core.c: remove semicolon at the end of define statement

Remove semicolon at the end of define statement to fix checkpatch warning.
WARNING: macros should not use a trailing semicolon

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMerge 4.2-rc4 into staging-next
Greg Kroah-Hartman [Mon, 27 Jul 2015 18:10:05 +0000 (11:10 -0700)]
Merge 4.2-rc4 into staging-next

We want the iio and other fixes in this branch as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoLinux 4.2-rc4 v4.2-rc4
Linus Torvalds [Sun, 26 Jul 2015 19:26:21 +0000 (12:26 -0700)]
Linux 4.2-rc4

8 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 26 Jul 2015 18:46:32 +0000 (11:46 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fix from Thomas Gleixner:
 "A single fix for the intel cqm perf facility to prevent IPIs from
  interrupt context"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel/cqm: Return cached counter value from IRQ context

8 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 26 Jul 2015 18:14:04 +0000 (11:14 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "This update contains:

   - the manual revert of the SYSCALL32 changes which caused a
     regression

   - a fix for the MPX vma handling

   - three fixes for the ioremap 'is ram' checks.

   - PAT warning fixes

   - a trivial fix for the size calculation of TLB tracepoints

   - handle old EFI structures gracefully

  This also contains a PAT fix from Jan plus a revert thereof.  Toshi
  explained why the code is correct"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mm/pat: Revert 'Adjust default caching mode translation tables'
  x86/asm/entry/32: Revert 'Do not use R9 in SYSCALL32' commit
  x86/mm: Fix newly introduced printk format warnings
  mm: Fix bugs in region_is_ram()
  x86/mm: Remove region_is_ram() call from ioremap
  x86/mm: Move warning from __ioremap_check_ram() to the call site
  x86/mm/pat, drivers/media/ivtv: Move the PAT warning and replace WARN() with pr_warn()
  x86/mm/pat, drivers/infiniband/ipath: Replace WARN() with pr_warn()
  x86/mm/pat: Adjust default caching mode translation tables
  x86/fpu: Disable dependent CPU features on "noxsave"
  x86/mpx: Do not set ->vm_ops on MPX VMAs
  x86/mm: Add parenthesis for TLB tracepoint size calculation
  efi: Handle memory error structures produced based on old versions of standard

8 years agox86/mm/pat: Revert 'Adjust default caching mode translation tables'
Thomas Gleixner [Sun, 26 Jul 2015 08:27:37 +0000 (10:27 +0200)]
x86/mm/pat: Revert 'Adjust default caching mode translation tables'

Toshi explains:

"No, the default values need to be set to the fallback types,
 i.e. minimal supported mode.  For WC and WT, UC is the fallback type.

 When PAT is disabled, pat_init() does update the tables below to
 enable WT per the default BIOS setup.  However, when PAT is enabled,
 but CPU has PAT -errata, WT falls back to UC per the default values."

Revert: ca1fec58bc6a 'x86/mm/pat: Adjust default caching mode translation tables'
Requested-by: Toshi Kani <toshi.kani@hp.com>
Cc: Jan Beulich <jbeulich@suse.de>
Link: http://lkml.kernel.org/r/1437577776.3214.252.camel@hp.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
8 years agoperf/x86/intel/cqm: Return cached counter value from IRQ context
Matt Fleming [Tue, 21 Jul 2015 14:55:09 +0000 (15:55 +0100)]
perf/x86/intel/cqm: Return cached counter value from IRQ context

Peter reported the following potential crash which I was able to
reproduce with his test program,

[  148.765788] ------------[ cut here ]------------
[  148.765796] WARNING: CPU: 34 PID: 2840 at kernel/smp.c:417 smp_call_function_many+0xb6/0x260()
[  148.765797] Modules linked in:
[  148.765800] CPU: 34 PID: 2840 Comm: perf Not tainted 4.2.0-rc1+ #4
[  148.765803]  ffffffff81cdc398 ffff88085f105950 ffffffff818bdfd5 0000000000000007
[  148.765805]  0000000000000000 ffff88085f105990 ffffffff810e413a 0000000000000000
[  148.765807]  ffffffff82301080 0000000000000022 ffffffff8107f640 ffffffff8107f640
[  148.765809] Call Trace:
[  148.765810]  <NMI>  [<ffffffff818bdfd5>] dump_stack+0x45/0x57
[  148.765818]  [<ffffffff810e413a>] warn_slowpath_common+0x8a/0xc0
[  148.765822]  [<ffffffff8107f640>] ? intel_cqm_stable+0x60/0x60
[  148.765824]  [<ffffffff8107f640>] ? intel_cqm_stable+0x60/0x60
[  148.765825]  [<ffffffff810e422a>] warn_slowpath_null+0x1a/0x20
[  148.765827]  [<ffffffff811613f6>] smp_call_function_many+0xb6/0x260
[  148.765829]  [<ffffffff8107f640>] ? intel_cqm_stable+0x60/0x60
[  148.765831]  [<ffffffff81161748>] on_each_cpu_mask+0x28/0x60
[  148.765832]  [<ffffffff8107f6ef>] intel_cqm_event_count+0x7f/0xe0
[  148.765836]  [<ffffffff811cdd35>] perf_output_read+0x2a5/0x400
[  148.765839]  [<ffffffff811d2e5a>] perf_output_sample+0x31a/0x590
[  148.765840]  [<ffffffff811d333d>] ? perf_prepare_sample+0x26d/0x380
[  148.765841]  [<ffffffff811d3497>] perf_event_output+0x47/0x60
[  148.765843]  [<ffffffff811d36c5>] __perf_event_overflow+0x215/0x240
[  148.765844]  [<ffffffff811d4124>] perf_event_overflow+0x14/0x20
[  148.765847]  [<ffffffff8107e7f4>] intel_pmu_handle_irq+0x1d4/0x440
[  148.765849]  [<ffffffff811d07a6>] ? __perf_event_task_sched_in+0x36/0xa0
[  148.765853]  [<ffffffff81219bad>] ? vunmap_page_range+0x19d/0x2f0
[  148.765854]  [<ffffffff81219d11>] ? unmap_kernel_range_noflush+0x11/0x20
[  148.765859]  [<ffffffff814ce6fe>] ? ghes_copy_tofrom_phys+0x11e/0x2a0
[  148.765863]  [<ffffffff8109e5db>] ? native_apic_msr_write+0x2b/0x30
[  148.765865]  [<ffffffff8109e44d>] ? x2apic_send_IPI_self+0x1d/0x20
[  148.765869]  [<ffffffff81065135>] ? arch_irq_work_raise+0x35/0x40
[  148.765872]  [<ffffffff811c8d86>] ? irq_work_queue+0x66/0x80
[  148.765875]  [<ffffffff81075306>] perf_event_nmi_handler+0x26/0x40
[  148.765877]  [<ffffffff81063ed9>] nmi_handle+0x79/0x100
[  148.765879]  [<ffffffff81064422>] default_do_nmi+0x42/0x100
[  148.765880]  [<ffffffff81064563>] do_nmi+0x83/0xb0
[  148.765884]  [<ffffffff818c7c0f>] end_repeat_nmi+0x1e/0x2e
[  148.765886]  [<ffffffff811d07a6>] ? __perf_event_task_sched_in+0x36/0xa0
[  148.765888]  [<ffffffff811d07a6>] ? __perf_event_task_sched_in+0x36/0xa0
[  148.765890]  [<ffffffff811d07a6>] ? __perf_event_task_sched_in+0x36/0xa0
[  148.765891]  <<EOE>>  [<ffffffff8110ab66>] finish_task_switch+0x156/0x210
[  148.765898]  [<ffffffff818c1671>] __schedule+0x341/0x920
[  148.765899]  [<ffffffff818c1c87>] schedule+0x37/0x80
[  148.765903]  [<ffffffff810ae1af>] ? do_page_fault+0x2f/0x80
[  148.765905]  [<ffffffff818c1f4a>] schedule_user+0x1a/0x50
[  148.765907]  [<ffffffff818c666c>] retint_careful+0x14/0x32
[  148.765908] ---[ end trace e33ff2be78e14901 ]---

The CQM task events are not safe to be called from within interrupt
context because they require performing an IPI to read the counter value
on all sockets. And performing IPIs from within IRQ context is a
"no-no".

Make do with the last read counter value currently event in
event->count when we're invoked in this context.

Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vikas Shivappa <vikas.shivappa@intel.com>
Cc: Kanaka Juvva <kanaka.d.juvva@intel.com>
Cc: Will Auld <will.auld@intel.com>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/1437490509-15373-1-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
8 years agoMerge tag 'usb-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 26 Jul 2015 03:11:12 +0000 (20:11 -0700)]
Merge tag 'usb-4.2-rc4' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here's a few USB and PHY fixes for 4.2-rc4.

  Nothing major, the shortlog has the full details.

  All of these have been in linux-next successfully"

* tag 'usb-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (21 commits)
  USB: OHCI: fix bad #define in ohci-tmio.c
  cdc-acm: Destroy acm_minors IDR on module exit
  usb-storage: Add ignore-device quirk for gm12u320 based usb mini projectors
  usb-storage: ignore ZTE MF 823 card reader in mode 0x1225
  USB: OHCI: Fix race between ED unlink and URB submission
  usb: core: lpm: set lpm_capable for root hub device
  xhci: do not report PLC when link is in internal resume state
  xhci: prevent bus_suspend if SS port resuming in phase 1
  xhci: report U3 when link is in resume state
  xhci: Calculate old endpoints correctly on device reset
  usb: xhci: Bugfix for NULL pointer deference in xhci_endpoint_init() function
  xhci: Workaround to get D3 working in Intel xHCI
  xhci: call BIOS workaround to enable runtime suspend on Intel Braswell
  usb: dwc3: Reset the transfer resource index on SET_INTERFACE
  usb: gadget: udc: core: Fix argument of dma_map_single for IOMMU
  usb: gadget: mv_udc_core: fix phy_regs I/O memory leak
  usb: ulpi: ulpi_init should be executed in subsys_initcall
  phy: berlin-usb: fix divider for BG2
  phy: berlin-usb: fix divider for BG2CD
  phy/pxa: add HAS_IOMEM dependency
  ...

8 years agoMerge tag 'tty-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 26 Jul 2015 03:05:07 +0000 (20:05 -0700)]
Merge tag 'tty-4.2-rc4' of git://git./linux/kernel/git/gregkh/tty

Pull tty/serial driver fixes from Greg KH:
 "Here are a number of small serial and tty fixes for reported issues.

  All have been in linux-next successfully"

* tag 'tty-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: vt: Fix !TASK_RUNNING diagnostic warning from paste_selection()
  serial: core: Fix crashes while echoing when closing
  m32r: Add ioreadXX/iowriteXX big-endian mmio accessors
  Revert "serial: imx: initialized DMA w/o HW flow enabled"
  sc16is7xx: fix FIFO address of secondary UART
  sc16is7xx: fix Kconfig dependencies
  serial: etraxfs-uart: Fix release etraxfs_uart_ports
  tty/vt: Fix the memory leak in visual_init
  serial: amba-pl011: Fix devm_ioremap_resource return value check
  n_tty: signal and flush atomically

8 years agoMerge tag 'staging-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 26 Jul 2015 03:03:10 +0000 (20:03 -0700)]
Merge tag 'staging-4.2-rc4' of git://git./linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg KH:
 "Here are a number of iio and staging driver fixes for reported issues
  for 4.2-rc4.

  All have been in linux-next for a while with no problems"

* tag 'staging-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (34 commits)
  iio:light:stk3310: make endianness independent of host
  iio:light:stk3310: move device register to end of probe
  iio: mma8452: use iio event type IIO_EV_TYPE_MAG
  iio: mcp320x: Fix NULL pointer dereference
  iio: adc: vf610: fix the adc register read fail issue
  iio: mlx96014: Replace offset sign
  iio: magnetometer: mmc35240: fix SET/RESET sequence
  iio: magnetometer: mmc35240: Fix SET/RESET mask
  iio: magnetometer: mmc35240: Fix crash in pm suspend
  iio:magnetometer:bmc150_magn: output intended variable
  iio:magnetometer:bmc150_magn: add regmap dependency
  staging: vt6656: check ieee80211_bss_conf bssid not NULL
  staging: vt6655: check ieee80211_bss_conf bssid not NULL
  iio: tmp006: Check channel info on write
  iio: sx9500: Add missing init in sx9500_buffer_pre{en,dis}able()
  iio:light:ltr501: fix regmap dependency
  iio:light:ltr501: fix variable in ltr501_init
  iio: sx9500: fix bug in compensation code
  iio: sx9500: rework error handling of raw readings
  iio: magnetometer: mmc35240: fix available sampling frequencies
  ...

8 years agoMerge tag 'char-misc-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 26 Jul 2015 02:50:59 +0000 (19:50 -0700)]
Merge tag 'char-misc-4.2-rc4' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are some char and misc driver fixes for reported issues.

  One parport patch is reverted as it was incorrect, thanks to testing
  by the 0-day bot"

* tag 'char-misc-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  parport: Revert "parport: fix memory leak"
  mei: prevent unloading mei hw modules while the device is opened.
  misc: mic: scif bug fix for vmalloc_to_page crash
  parport: fix freeing freed memory
  parport: fix memory leak
  parport: fix error handling

8 years agoparport: Revert "parport: fix memory leak"
Sudip Mukherjee [Sat, 25 Jul 2015 07:49:40 +0000 (13:19 +0530)]
parport: Revert "parport: fix memory leak"

This reverts commit 23c405912b88 ("parport: fix memory leak")

par_dev->state was already being removed in parport_unregister_device().

Reported-by: Ying Huang <ying.huang@intel.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMerge tag 'trace-v4.2-rc2-fix3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 25 Jul 2015 18:42:54 +0000 (11:42 -0700)]
Merge tag 'trace-v4.2-rc2-fix3' of git://git./linux/kernel/git/rostedt/linux-trace

Pull ftrace fix from Steven Rostedt:
 "Back in 3.16 the ftrace code was redesigned and cleaned up to remove
  the double iteration list (one for registered ftrace ops, and one for
  registered "global" ops), to just use one list.  That simplified the
  code but also broke the function tracing filtering on pid.

  This updates the code to handle the filtering again with the new
  logic"

* tag 'trace-v4.2-rc2-fix3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  ftrace: Fix breakage of set_ftrace_pid

8 years agoMerge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw...
Linus Torvalds [Sat, 25 Jul 2015 18:36:12 +0000 (11:36 -0700)]
Merge branch 'libnvdimm-fixes' of git://git./linux/kernel/git/djbw/nvdimm

Pull libnvdimm fix from Dan Williams:
 "A minor fix for the libnvdimm subsystem.

  This is not critical.  The problem can be worked around in userspace
  by putting the namespace temporarily into raw mode
  (ndctl_namespace_set_raw_mode() from libndctl), but that is awkward
  for management utilities.

* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm:
  libnvdimm: fix namespace seed creation

8 years agoMerge tag 'md/4.2-fixes' of git://neil.brown.name/md
Linus Torvalds [Sat, 25 Jul 2015 18:24:58 +0000 (11:24 -0700)]
Merge tag 'md/4.2-fixes' of git://neil.brown.name/md

Pull md fixes from Neil Brown:
 "Some md fixes for 4.2

  Several are tagged for -stable.
  A few aren't because they are not very, serious or because they are in
  the 'experimental' cluster code"

* tag 'md/4.2-fixes' of git://neil.brown.name/md:
  md/raid5: clear R5_NeedReplace when no longer needed.
  Fix read-balancing during node failure
  md-cluster: fix bitmap sub-offset in bitmap_read_sb
  md: Return error if request_module fails and returns positive value
  md: Skip cluster setup in case of error while reading bitmap
  md/raid1: fix test for 'was read error from last working device'.
  md: Skip cluster setup for dm-raid
  md: flush ->event_work before stopping array.
  md/raid10: always set reshape_safe when initializing reshape_position.
  md/raid5: avoid races when changing cache size.

8 years agoMerge tag 'for-linus-20150724' of git://git.infradead.org/linux-mtd
Linus Torvalds [Sat, 25 Jul 2015 18:19:38 +0000 (11:19 -0700)]
Merge tag 'for-linus-20150724' of git://git.infradead.org/linux-mtd

Pull MTD fixes from Brian Norris:
 "Two trivial updates.  I meant to send these much earlier, but I've
  been preoccupied.

   - Add MAINTAINERS entry for diskonchip g3 driver

   - Fix an overlooked conflict in bitfield value assignments

  The latter update is a bit overdue, but there's no reason to wait any
  longer"

* tag 'for-linus-20150724' of git://git.infradead.org/linux-mtd:
  mtd: nand: Fix NAND_USE_BOUNCE_BUFFER flag conflict
  MAINTAINERS: mtd: docg3: add docg3 maintainer

8 years agolibnvdimm: fix namespace seed creation
Dan Williams [Sat, 25 Jul 2015 03:42:34 +0000 (23:42 -0400)]
libnvdimm: fix namespace seed creation

A new BLK namespace "seed" device is created whenever the current seed
is successfully probed.  However, if that namespace is assigned to a BTT
it may never directly experience a successful probe as it is a
subordinate device to a BTT configuration.

The effect of the current code is that no new namespaces can be
instantiated, after the seed namespace, to consume available BLK DPA
capacity.  Fix this by treating a successful BTT probe event as a
successful probe event for the backing namespace.

Reported-by: Nicholas Moulin <nicholas.w.moulin@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
9 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Sat, 25 Jul 2015 00:00:04 +0000 (17:00 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Four smaller fixes for the current series.  This contains:

   - A fix for clones of discard bio's, that can cause data corruption.
     From Martin.

   - A fix for null_blk, where in certain queue modes it could access a
     request after it had been freed.  From Mike Krinkin.

   - An error handling leak fix for blkcg, from Tejun.

   - Also from Tejun, export of the functions that a file system needs
     to implement cgroup writeback support"

* 'for-linus' of git://git.kernel.dk/linux-block:
  block: Do a full clone when splitting discard bios
  block: export bio_associate_*() and wbc_account_io()
  blkcg: fix gendisk reference leak in blkg_conf_prep()
  null_blk: fix use-after-free problem

9 years agoMerge branch 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Fri, 24 Jul 2015 23:54:59 +0000 (16:54 -0700)]
Merge branch 'for-4.2-fixes' of git://git./linux/kernel/git/tj/libata

Pull libata fixes from Tejun Heo:
 "A couple important fixes.

   - A block layer change which removed restriction on max transfer size
     led to silent data corruption on some devices.  A new quirk is
     added to restore the old size limit for the reported device.  If it
     gets reported on more devices, we might have to consider restoring
     the restriction for ATA devices by default.

   - There finally is a SSD which is confirmed to cause data corruption
     on TRIM regardless of which flavor is used.  A new quirk is added
     and the device is blacklisted

   - Other device-specific workarounds"

* 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  libata: Do not blacklist M510DC
  libata: increase the timeout when setting transfer mode
  libata: add ATA_HORKAGE_MAX_SEC_1024 to revert back to previous max_sectors limit
  libata: force disable trim for SuperSSpeed S238
  libata: add ATA_HORKAGE_NOTRIM
  libata: add ATA_HORKAGE_BROKEN_FPDMA_AA quirk for HP 250GB SATA disk VB0250EAVER
  ata: pmp: add quirk for Marvell 4140 SATA PMP

9 years agoMerge tag 'mmc-4.2-rc3' of git://git.linaro.org/people/ulf.hansson/mmc
Linus Torvalds [Fri, 24 Jul 2015 23:43:16 +0000 (16:43 -0700)]
Merge tag 'mmc-4.2-rc3' of git://git.linaro.org/people/ulf.hansson/mmc

Pull MMC fixes from Ulf Hansson:
 "Here are some mmc fixes intended for v4.2 rc4.

  Note, most of the changes are for the sdhci-esdhc-imx controller,
  which also required us to modify some related DTS files.  Those
  changes have been acked by the SoC maintainer.

  MMC core:
   - Fix a reference inbalance issue for power_ro_lock_show() sysfs handler

  MMC host:
   - omap_hsmmc: Fix IRQ errorhandling for CD, DTO, and CRC
   - sdhci: Prevent a kernel panic while using DMA
   - mtk-sd: Let it depend on HAS_DMA to prevent build errors
   - sdhci-esdhc: Make 8BIT bus work
   - sdhci-esdhc-imx: Fix some regressions for DT based platforms
   - sdhci-pxav3: Fix a regression for DT based platforms"

* tag 'mmc-4.2-rc3' of git://git.linaro.org/people/ulf.hansson/mmc:
  mmc: sdhci-pxav3: fix platform_data is not initialized
  dts: mmc: fsl-imx-esdhc: remove fsl,cd-controller support
  mmc: sdhci-esdhc-imx: clear f_max in boarddata
  mmc: sdhci-esdhc-imx: remove duplicated dts parsing
  mmc: sdhci: make max-frequency property in device tree work
  mmc: sdhci-esdhc-imx: move all non dt probe code into one function
  mmc: sdhci-esdhc-imx: fix cd regression for dt platform
  dts: imx7: fix sd card gpio polarity specified in device tree
  dts: imx25: fix sd card gpio polarity specified in device tree
  dts: imx6: fix sd card gpio polarity specified in device tree
  dts: imx53: fix sd card gpio polarity specified in device tree
  dts: imx51: fix sd card gpio polarity specified in device tree
  mmc: sdhci-esdhc: Make 8BIT bus work
  mmc: block: Add missing mmc_blk_put() in power_ro_lock_show()
  mmc: MMC_MTK should depend on HAS_DMA
  mmc: sdhci check parameters before call dma_free_coherent
  mmc: omap_hsmmc: Handle BADA, DEB and CEB interrupts
  mmc: omap_hsmmc: Fix DTO and DCRC handling

9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Fri, 24 Jul 2015 23:33:11 +0000 (16:33 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:
 "A fix for the warnings/oops when handling HID devices with "unnamed"
  LEDs and couple of other driver fixups""

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: goodix - fix touch coordinates on WinBook TW100 and TW700
  Input: LEDs - skip unnamed LEDs
  Input: usbtouchscreen - avoid unresponsive TSC-30 touch screen
  Input: elantech - force resolution of 31 u/mm
  Input: zforce - don't overwrite the stack

9 years agostaging: lustre: Replace strtoul with simple_strtoul
Guenter Roeck [Fri, 24 Jul 2015 16:37:14 +0000 (09:37 -0700)]
staging: lustre: Replace strtoul with simple_strtoul

Defining and using strtoul in lustre code results in the following
compile warnings (arm64:allmodconfig).

include/linux/libcfs/libcfs_string.h:105:0: warning: "strtoul" redefined
#define strtoul(str, endp, base) simple_strtoul(str, endp, base)
include/acpi/platform/aclinux.h:122:0: note:
this is the location of the previous definition
#define strtoul simple_strtoul

Remove the definition and use simple_strtoul() directly. Note that we
can not replace simple_strtoul with kstrtoul since the end pointer
is used by the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: add MOST driver's documentation
Christian Gromm [Fri, 24 Jul 2015 14:11:56 +0000 (16:11 +0200)]
Staging: most: add MOST driver's documentation

This patch adds the documentation to the MOST driver that describes its ABI
interface and the basic usage.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: add MOST driver's hdm-usb module
Christian Gromm [Fri, 24 Jul 2015 14:11:55 +0000 (16:11 +0200)]
Staging: most: add MOST driver's hdm-usb module

This patch adds the hdm-usb module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
the USB interface of the MOST network interface controller.

This patch is needed in order to use the USB peripheral interface of the
network interface controller.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: add MOST driver's hdm-i2c module
Christian Gromm [Fri, 24 Jul 2015 14:11:54 +0000 (16:11 +0200)]
Staging: most: add MOST driver's hdm-i2c module

This patch adds the hdm-i2c module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
the I2C interface of the MOST network interface controller.

This patch is needed in order to use the I2C peripheral interface of the
network interface controller.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: add MOST driver's hdm-dim2 module
Christian Gromm [Fri, 24 Jul 2015 14:11:53 +0000 (16:11 +0200)]
Staging: most: add MOST driver's hdm-dim2 module

This patch adds the hdm-dim2 module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
the MediaLB interface of the MOST network interface controller.

This patch is needed in order to use the MediaLB peripheral interface of
the network interface controller.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: add MOST driver's aim-v4l2 module
Christian Gromm [Fri, 24 Jul 2015 14:11:52 +0000 (16:11 +0200)]
Staging: most: add MOST driver's aim-v4l2 module

This patch adds the aim-v4l2 module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
user space interaction by means of V4L2.

This patch is needed in order to have access to MOST isochronous AVP data
through V4L2 devices.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: add MOST driver's aim-sound module
Christian Gromm [Fri, 24 Jul 2015 14:11:51 +0000 (16:11 +0200)]
Staging: most: add MOST driver's aim-sound module

This patch adds the aim-sound module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
user space interaction by means of ALSA devices.

This patch is needed in order to have access to MOST synchronous data
through ALSA devices.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: add MOST driver's aim-network module
Christian Gromm [Fri, 24 Jul 2015 14:11:50 +0000 (16:11 +0200)]
Staging: most: add MOST driver's aim-network module

This patch adds the aim-network module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
user space interaction by means of network devices.

This patch is needed in order to have access to MOST Ethernet Packets (MEP)
through a networking device.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: add MOST driver's aim-cdev module
Christian Gromm [Fri, 24 Jul 2015 14:11:49 +0000 (16:11 +0200)]
Staging: most: add MOST driver's aim-cdev module

This patch adds the aim-cdev module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
user space interaction by means of character devices.

This patch is needed in order to have access to MOST data through
character devices.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: add MOST driver's core module
Christian Gromm [Fri, 24 Jul 2015 14:11:48 +0000 (16:11 +0200)]
Staging: most: add MOST driver's core module

This patch adds the core module of the MOST driver to the kernel's driver
staging area. This module is part of the MOST driver and handles the
configuration interface in sysfs, the buffer management and the data
routing.

MOST defines the protocol, hardware and software layers necessary to allow
for the efficient and low-cost transport of control, real-time and packet
data using a single medium (physical layer). Media currently in use are
fiber optics, unshielded twisted pair cables (UTP) and coax cables. MOST
also supports various speed grades up to 150 Mbps.
For more information on MOST, visit the MOST Cooperation website:
www.mostcooperation.com.

Cars continue to evolve into sophisticated consumer electronics platforms,
increasing the demand for reliable and simple solutions to support audio,
video and data communications. MOST can be used to connect multiple
consumer devices via optical or electrical physical layers directly to one
another or in a network configuration. As a synchronous network, MOST
provides excellent Quality of Service and seamless connectivity for
audio/video streaming. Therefore, the driver perfectly fits to the mission
of Automotive Grade Linux to create open source software solutions for
automotive applications.

The driver consists basically of three layers. The hardware layer, the
core layer and the application layer. The core layer consists of the core
module only. This module handles the communication flow through all three
layers, the configuration of the driver, the configuration interface
representation in sysfs, and the buffer management.
For each of the other two layers a selection of modules is provided. These
modules can arbitrarily be combined to meet the needs of the desired
system architecture. A module of the hardware layer is referred to as an
HDM (hardware dependent module). Each module of this layer handles exactly
one of the peripheral interfaces of a network interface controller (e.g.
USB, MediaLB, I2C). A module of the application layer is referred to as an
AIM (application interfacing module). The modules of this layer give access
to MOST via one the following ways: character devices, ALSA, Networking or
V4L2.

To physically access MOST, an Intelligent Network Interface Controller
(INIC) is needed. For more information on available controllers visit:
www.microchip.com

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visornic - prevent NETDEV WATCHDOG timeouts after IO recovery
Tim Sell [Fri, 24 Jul 2015 16:00:25 +0000 (12:00 -0400)]
staging: unisys: visornic - prevent NETDEV WATCHDOG timeouts after IO recovery

After IO partition recovery, it was possible to get into a situation where
a visornic device would repeatedly report:

    NETDEV WATCHDOG: eth0 (): transmit queue 0 timed out

The actual problem would affect any visornic device that was rapidly
transmitting at the same time the IO partition was being recovered. Once
you hit the problem, the only way to resume use of the nic would be to
reboot the Linux client partition.

The problem was caused by chstat.sent_xmit and chstat.got_xmit_done NOT
getting cleared during IO partition recovery. This is necessary because
outstanding xmits would essentially be "abandoned" during such recovery.
These fields are now cleared in virtnic_serverdown_complete().

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visornic - check visorchannel_signalinsert/remove failures
Tim Sell [Fri, 24 Jul 2015 16:00:23 +0000 (12:00 -0400)]
staging: unisys: visornic - check visorchannel_signalinsert/remove failures

Logic to check for failures of visorchannel_signalinsert() and
visorchannel_signalremove() were added, and a new sent_post_failed counter
tracks the number of times we failed to post a rcv buffer to the IO
partition.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visornic - ensure proper net locking in tx reset logic
Tim Sell [Fri, 24 Jul 2015 16:00:22 +0000 (12:00 -0400)]
staging: unisys: visornic - ensure proper net locking in tx reset logic

visornic tx reset handling is done asynchronously via a workqueue in
visornic_timeout_reset().  As a result, it needs to use rtnl_lock() /
rtnl_unlock() to lock against possible simultaneous close() of the network
device.

(I consulted the bnx2 driver as a model here, as that driver also does
its tx reset handling asynchronously, just like visornic does.  See
bnx2_tx_timeout() and bnx2_reset_task().)

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Process more than one response per check
David Kershner [Fri, 24 Jul 2015 16:00:21 +0000 (12:00 -0400)]
staging: unisys: Process more than one response per check

When s-Par is in polling mode it checks every 2 ms to see if there is
a response from the IO service partition in the queue. Currently it
just reads one entry per 2 ms, this needs to be changed so it drains
the queue on each check.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>