Re: btrfs-rmw-2: page allocation failure: order:1, mode:0x8020

2014-03-29 Thread Marc MERLIN
+linux-kernel since I got no answer.

Hi,

I see you are maintainers of/contributors to drivers/scsi/mvsas

The btrfs folks pointed out that the problem below is due to the MVS driver,
namely:

From: Chris Mason 

This is an order 1 atomic allocation from the mvs driver, we really
should not be depending on that to get IO done.  A quick search and it
looks like we're allocating MVS_SLOT_BUF_SZ (8192) bytes.

You could try bumping the lowmem reserves.

-chris


Would you be able to modify the driver to avoid these low memory problems?

Thanks,
Marc


- Forwarded message from Marc MERLIN  -

From: Marc MERLIN 
To: linux-bt...@vger.kernel.org

My server died last night during a btrfs send/receive to a btrfs radi5 array

Here are the logs. Is this anything known or with a possible workaround?

Thanks,
Marc

btrfs-rmw-2: page allocation failure: order:1, mode:0x8020
CPU: 1 PID: 12499 Comm: btrfs-rmw-2 Not tainted 
3.14.0-rc5-amd64-i915-preempt-20140216c #1
Hardware name: System manufacturer P5KC/P5KC, BIOS 050205/24/2007
  88000549d780 816090b3 
 88000549d808 811037b0 0001fffe 88007ff7ce00
  0002 0030 88007ff7ce00
Call Trace:
 [] dump_stack+0x4e/0x7a
 [] warn_alloc_failed+0x111/0x125
 [] __alloc_pages_nodemask+0x707/0x854
 [] ? dma_generic_alloc_coherent+0xa7/0x11c
 [] dma_generic_alloc_coherent+0xa7/0x11c
 [] dma_pool_alloc+0x10a/0x1cb
 [] mvs_task_prep+0x192/0xa42 [mvsas]
 [] ? blkg_path.isra.80.constprop.90+0x17/0x38
 [] ? cache_alloc+0x1c/0x29b
 [] mvs_task_exec.isra.9+0x5d/0xc9 [mvsas]
 [] mvs_queue_command+0x3d/0x29b [mvsas]
 [] ? kmem_cache_alloc+0xe3/0x161
 [] sas_ata_qc_issue+0x1cd/0x235 [libsas]
 [] ata_qc_issue+0x291/0x2f1
 [] ? ata_scsiop_mode_sense+0x29c/0x29c
 [] __ata_scsi_queuecmd+0x184/0x1e0
 [] ata_sas_queuecmd+0x31/0x4d
 [] sas_queuecommand+0x98/0x1fe [libsas]
 [] scsi_dispatch_cmd+0x14f/0x22e
 [] scsi_request_fn+0x4da/0x507
 [] ? blk_recount_segments+0x1e/0x2e
 [] __blk_run_queue_uncond+0x22/0x2b
 [] __blk_run_queue+0x19/0x1b
 [] blk_queue_bio+0x23f/0x256
 [] generic_make_request+0x9c/0xdb
 [] submit_bio+0x112/0x131
 [] rmw_work+0x112/0x162
 [] worker_loop+0x168/0x4d8
 [] ? btrfs_queue_worker+0x283/0x283
 [] kthread+0xae/0xb6
 [] ? __kthread_parkme+0x61/0x61
 [] ret_from_fork+0x7c/0xb0
 [] ? __kthread_parkme+0x61/0x61
Mem-Info:
Node 0 DMA per-cpu:
CPU0: hi:0, btch:   1 usd:   0
CPU1: hi:0, btch:   1 usd:   0
Node 0 DMA32 per-cpu:
CPU0: hi:  186, btch:  31 usd: 171
CPU1: hi:  186, btch:  31 usd: 190
active_anon:17298 inactive_anon:21061 isolated_anon:0
 active_file:67491 inactive_file:94189 isolated_file:32
 unevictable:1260 dirty:38914 writeback:49596 unstable:0
 free:15999 slab_reclaimable:8198 slab_unreclaimable:9741
 mapped:12981 shmem:1661 pagetables:2711 bounce:0
 free_cma:0
Node 0 DMA free:8084kB min:348kB low:432kB high:520kB active_anon:360kB 
inactive_anon:764kB active_file:288kB inactive_file:2040kB unevictable:100kB 
isolated(anon):0kB isolated(file):0kB present:15976kB managed:15892kB 
mlocked:100kB dirty:0kB writeback:1272kB mapped:252kB shmem:8kB 
slab_reclaimable:168kB slab_unreclaimable:336kB kernel_stack:88kB 
pagetables:128kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB 
pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 1987 1987 1987
Node 0 DMA32 free:56080kB min:44704kB low:55880kB high:67056kB 
active_anon:68832kB inactive_anon:83480kB active_file:269676kB 
inactive_file:374588kB unevictable:4940kB isolated(anon):0kB 
isolated(file):128kB present:2080256kB managed:2039064kB mlocked:4940kB 
dirty:155668kB writeback:197112kB mapped:51672kB shmem:6636kB 
slab_reclaimable:32624kB slab_unreclaimable:38628kB kernel_stack:2912kB 
pagetables:10716kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB 
pages_scanned:32 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 85*4kB (UEM) 22*8kB (UEM) 62*16kB (UEM) 6*32kB (UM) 2*64kB (UE) 
5*128kB (UEM) 6*256kB (UEM) 4*512kB (EM) 0*1024kB 1*2048kB (R) 0*4096kB = 8100kB
Node 0 DMA32: 13004*4kB (M) 16*8kB (M) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 
0*512kB 0*1024kB 0*2048kB 1*4096kB (R) = 56240kB
Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
164139 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 9255932kB
Total swap = 9255932kB
524058 pages RAM
0 pages HighMem/MovableOnly
10298 pages reserved
0 pages hwpoisoned
mvsas :01:00.0: mvsas prep failed[0]!
btrfs-rmw-2: page allocation failure: order:1, mode:0x8020
CPU: 1 PID: 12499 Comm: btrfs-rmw-2 Not tainted 
3.14.0-rc5-amd64-i915-preempt-20140216c #1
Hardware name: System manufacturer P5KC/P5KC, BIOS 050205/24/2007
  88000549d690 816090b3 

Re: [PATCH] [media] uvcvideo: Fix clock param realtime setting

2014-03-29 Thread Olivier Langlois
Hi Laurent,

> > Yes. ffmpeg uses wall clock time to create timestamps for audio packets from
> > ALSA device.
> 
> OK. I suppose I shouldn't drop support for the realtime clock like I wanted 
> to 
> then :-)
>  
> > There is a bug in ffmpeg describing problems to synchronize audio and
> > the video from a v4l2 webcam.
> > 
> > https://trac.ffmpeg.org/ticket/692
> > 
> > To workaround this issue, ffmpeg devs added a switch to convert back
> > monotonic to realtime. From ffmpeg/libavdevice/v4l2.c:
> > 
> >   -ts.D set type of timestamps for
> > grabbed frames (from 0 to 2) (default 0)
> >  default  .D use timestamps from the kernel
> >  abs  .D use absolute timestamps (wall
> > clock)
> >  mono2abs .D force conversion from monotonic
> > to absolute timestamps
> > 
> > If the v4l2 driver is able to send realtime ts, it is easier synchronize
> > in userspace if all inputs use the same clock.
> 
> That might be a stupid question, but shouldn't ALSA use the monotonic clock 
> instead ?
> 
I think that I have that answer why ffmpeg use realtime clock for ALSA
data. In fact ffmpeg uses realtime clock for every data coming from
capture devices and the purpose is to be able to seek into the recorded
stream by using the date where the recording occured. Same principle
than a camera recording dates when pictures are taken.

now a tougher question is whether or not it is up to the driver to
provide these realtime ts.

I'm looking forward your verdict.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Loan Offer @3% intereste Rate.

2014-03-29 Thread Brody Hills Loans
Are you in any financial problem? Do you need quick loans or to clear
your debts and get back to business. If so do contact us for more
details for loan application. contact us only on this email>
brodyloanho...@gmail.com
All your responses should be send to our private Email: brodyloanho...@gmail.com

BRODY LOANS
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 13/29] ktap: add ring buffer handling code(kernel/trace/ktap/kp_transport.[c|h])

2014-03-29 Thread Andi Kleen
> 
> A lot of code in this file is duplicated with kernel trace_output.c.

Please modify trace_output instead to avoid this.

-Andi

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 12/29] ktap: add generic object handling code(kernel/trace/ktap/kp_obj.[c|h])

2014-03-29 Thread Andi Kleen
> + * You should have received a copy of the GNU General Public License along 
> with
> + * this program; if not, write to the Free Software Foundation, Inc.,
> + * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.

We're not supposed to use the address anymore.

> +/* memory allocation flag */
> +#define KTAP_ALLOC_FLAGS ((GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN) \
> +  & ~__GFP_WAIT)
> +
> +void *kp_malloc(ktap_state_t *ks, int size)
> +{
> + void *addr;
> +
> + addr = kmalloc(size, KTAP_ALLOC_FLAGS);
> + if (unlikely(!addr)) {
> + kp_error(ks, "kmalloc failed\n");
> + }
> + return addr;

Please remove this pointless wrapper. Similar for the functions below.
Just use kmalloc etc. directly.

> + case KTAP_TNUM:
> + kp_printf(ks, "NUM %ld", nvalue(v));

Similar here. That's all printk


-Andi
-- 
a...@linux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 10/29] ktap: add string handling code(kernel/trace/ktap/kp_[str|mempool].[c|h])

2014-03-29 Thread Andi Kleen

It's not clear to me why a kernel script language needs
all that complicated string interning code.

What kind of scripts would create as many strings that
it would be worth it?

I think it would be better to replace it with a really
simple non interning dynamic string type.

-Andi

-- 
a...@linux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


LÅN OFFER

2014-03-29 Thread CREDIT RECOVERY LIMITED

Good Day,

  Trenger du et lån vi tilbyr lån av alle slag

   Vi tilbyr personlige og forretningsmessige lån med kapitalbase
mellom mengder av $ 2,000.00 til $ 500,000,000.00 amerikanske
dollar, euro eller pund Europa til enkeltpersoner, bedrifter og
samarbeide organer uavhengig av sivilstand , må kjønn, religion ,
og den posisjonen , men har en lovlige midler til å tilbakebetale
lånet på tid som er fastsatt , og må være troverdig med renten så
lav som 3 % .

Hvis dette passer seg dine forventninger, så vi kan fortsette
videre , vil jeg gjerne at du skal fortelle det nøyaktige beløpet
du trenger for som lån og at det haster med denne transaksjonen
for videre behandling du skal fylle ut og sende inn nødvendig
informasjon nedenfor :

SØKER INFORMASJON

* Søkerens navn :
* Adresse av søkeren :
* By:
* Land :
* Kjønn :
* Sivil status :
* Alder :
* Månedlig Inntekt:
* Yrke :
* Tel :/ Mobil :
* Beløp søkt :
* Lån Varighet :
* E - post :

  Vi forventer svaret ditt .

Vennlig hilsen ,
David Donald



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3.13 00/46] 3.13.8-stable review

2014-03-29 Thread Greg Kroah-Hartman
On Sat, Mar 29, 2014 at 07:25:30PM -0600, Shuah Khan wrote:
> On 03/28/2014 11:31 AM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 3.13.8 release.
> > There are 46 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> >
> > Responses should be made by Sun Mar 30 17:31:14 UTC 2014.
> > Anything received after that time might be too late.
> >
> > The whole patch series can be found in one patch at:
> > kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.13.8-rc1.gz
> > and the diffstat can be found below.
> >
> > thanks,
> >
> > greg k-h
> >
> 
> Compiled, and booted on my test systems. No regressions in dmesg.

Thanks for testing all 3 of these and letting me know.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 08/29] ktap: add bytecode reader(kernel/trace/ktap/kp_bcread.[c|h])

2014-03-29 Thread Andi Kleen
> +/* Read debug info of a prototype. */
> +static void bcread_dbg(BCReadCtx *ctx, ktap_proto_t *pt, int sizedbg)
> +{
> + void *lineinfo = (void *)proto_lineinfo(pt);
> +
> + bcread_block(ctx, lineinfo, sizedbg);
> + /* Swap lineinfo if the endianess differs. */


Why does this care about endianness? Can't that be handled in the user
space? And why would the user space create different endianness than
the host is?

> + for (i = 0; i < sizekgc; i++, kr++) {
> + int tp = bcread_uint32(ctx);
> + if (tp >= BCDUMP_KGC_STR) {

The signedness handling all over this file is a scary.
What happens if the user puts in negative values or near overflow
values.

Most likely a lot of these checks should be unsigned
and need to be audited again (and ideally fuzzed too)

> +
> + /* Allocate prototype object and initialize its fields. */
> + pt = (ktap_proto_t *)kp_obj_new(ctx->ks, (int)sizept);

Error check?

Lots of other similar cases.


-Andi

-- 
a...@linux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Half price off all watches

2014-03-29 Thread Linux c programming
Look rich without paying the price with one of our quality branded watches
http://www.princessbag.co.jp/eufqour.php


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH net-next v2] net-sysfs: expose number of carrier on/off changes

2014-03-29 Thread Eric Dumazet
On Sat, 2014-03-29 at 18:36 -0700, Stephen Hemminger wrote:
> On Sat, 29 Mar 2014 09:48:35 -0700
> David Decotigny  wrote:
> 
> > This allows to monitor carrier on/off transitions and detect link
> > flapping issues:
> >  - new /sys/class/net/X/carrier_changes
> >  - new rtnetlink IFLA_CARRIER_CHANGES (getlink)
> > 
> > Tested:
> >   - grep . /sys/class/net/*/carrier_changes
> > + ip link set dev X down/up
> > + plug/unplug cable
> >   - updated iproute2: prints IFLA_CARRIER_CHANGES
> >   - iproute2 20121211-2 (debian): unchanged behavior
> > 
> > Signed-off-by: David Decotigny 
> 
> Is there a related SNMP MIB variable? should there be?

I don't think we have any SNMP MIB variable for devices ?

It seems "ip link" is the facto standard.

(BTW we put BusyPollRxPackets in TcpExt group, this was an error IMHO)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[git pull] Input updates for 3.14-rc8 (take 2)

2014-03-29 Thread Dmitry Torokhov
Hi Linus,

Please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git for-linus
or
master.kernel.org:/pub/scm/linux/kernel/git/dtor/input.git for-linus

to receive some more updates for the input subsystem. You will get a fix
for race in mousedev that has been causing quite a few oopses lately and
a small fixup for force feedback support in evdev.

Changelog:
-

Dmitry Torokhov (1):
  Input: mousedev - fix race when creating mixed device

Elias Vanderstuyft (1):
  Input: don't modify the id of ioctl-provided ff effect on upload failure


Diffstat:


 drivers/input/evdev.c|  4 ++-
 drivers/input/mousedev.c | 73 
 2 files changed, 45 insertions(+), 32 deletions(-)


-- 
Dmitry



pgpxo4TIviqZT.pgp
Description: PGP signature


Re: [PATCH net-next v2] net-sysfs: expose number of carrier on/off changes

2014-03-29 Thread Stephen Hemminger
On Sat, 29 Mar 2014 09:48:35 -0700
David Decotigny  wrote:

> This allows to monitor carrier on/off transitions and detect link
> flapping issues:
>  - new /sys/class/net/X/carrier_changes
>  - new rtnetlink IFLA_CARRIER_CHANGES (getlink)
> 
> Tested:
>   - grep . /sys/class/net/*/carrier_changes
> + ip link set dev X down/up
> + plug/unplug cable
>   - updated iproute2: prints IFLA_CARRIER_CHANGES
>   - iproute2 20121211-2 (debian): unchanged behavior
> 
> Signed-off-by: David Decotigny 

Is there a related SNMP MIB variable? should there be?


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3.10 00/22] 3.10.35-stable review

2014-03-29 Thread Shuah Khan

On 03/28/2014 11:31 AM, Greg Kroah-Hartman wrote:

This is the start of the stable review cycle for the 3.10.35 release.
There are 22 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Sun Mar 30 17:30:55 UTC 2014.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.10.35-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h



Compiled, and booted on my test systems. No regressions in dmesg.

-- Shuah

--
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
shuah...@samsung.com | (970) 672-0658
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3.4 00/13] 3.4.85-stable review

2014-03-29 Thread Shuah Khan

On 03/28/2014 11:31 AM, Greg Kroah-Hartman wrote:

This is the start of the stable review cycle for the 3.4.85 release.
There are 13 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Sun Mar 30 17:30:36 UTC 2014.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.4.85-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h



Compiled, and booted on my test systems. No regressions in dmesg.

-- Shuah

--
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
shuah...@samsung.com | (970) 672-0658
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3.13 00/46] 3.13.8-stable review

2014-03-29 Thread Shuah Khan

On 03/28/2014 11:31 AM, Greg Kroah-Hartman wrote:

This is the start of the stable review cycle for the 3.13.8 release.
There are 46 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Sun Mar 30 17:31:14 UTC 2014.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.13.8-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h



Compiled, and booted on my test systems. No regressions in dmesg.

-- Shuah

--
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
shuah...@samsung.com | (970) 672-0658
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/3] staging/ozwpan: coding style ether_addr_copy

2014-03-29 Thread Joe Perches
On Sun, 2014-03-30 at 02:29 +0300, Dan Carpenter wrote:
> These days in the kernel we treat checkpatch.pl and GCC
> warnings the same so it sucks when they are something conditional.

Treating checkpatch messages like gcc compilation warnings
and failures has got to change.

There is _no way_ checkpatch can have no false positives.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


You have received 1.5m pounds as donation see link www.bbc.co.uk/news/uk-england-19254228 send name address and phone number for info

2014-03-29 Thread Adrian Gillian Bayford
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC PATCH v2 00/29] ktap: A lightweight dynamic tracing tool for Linux

2014-03-29 Thread Andi Kleen

For now I would suggest concentrating on the kernel ring 0 parts only.
Split the user space part into a separate patchkit that is posted 
on a separate schedule.

It's hard to make progress with too large patchkits.

-Andi

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 15/28] ktap: add built-in functions and library (runtime/lib_*.c)

2014-03-29 Thread Andi Kleen
> Maybe in future, after ktap support "include" or "require" to
> import user defined library in userspace.

Can't you just have some hardcoded standard script for now that is 
always appeneded and provides these functions?

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Documentation: trivial spelling error changes

2014-03-29 Thread Carlos
Fixed multiple spelling errors.

Signed-off-by: Carlos E. Garcia 
---
 Documentation/DMA-attributes.txt |  2 +-
 Documentation/block/biodoc.txt   |  8 
 Documentation/block/cfq-iosched.txt  |  2 +-
 Documentation/cgroups/net_prio.txt   |  4 ++--
 Documentation/devicetree/bindings/arm/omap/omap.txt  |  2 +-
 Documentation/devicetree/bindings/bus/mvebu-mbus.txt |  2 +-
 Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt |  2 +-
 Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt |  2 +-
 Documentation/devicetree/bindings/mmc/samsung-sdhci.txt  |  2 +-
 Documentation/devicetree/bindings/mtd/gpmc-nand.txt  |  2 +-
 Documentation/devicetree/bindings/mtd/gpmc-nor.txt   |  2 +-
 Documentation/devicetree/bindings/mtd/gpmc-onenand.txt   |  2 +-
 .../devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt| 12 ++--
 Documentation/devicetree/bindings/powerpc/4xx/reboot.txt |  2 +-
 Documentation/devicetree/bindings/powerpc/fsl/dcsr.txt   |  2 +-
 Documentation/devicetree/bindings/regulator/regulator.txt|  2 +-
 Documentation/devicetree/bindings/spi/spi-bus.txt|  2 +-
 Documentation/dma-buf-sharing.txt|  2 +-
 Documentation/dynamic-debug-howto.txt|  2 +-
 Documentation/edac.txt   |  2 +-
 Documentation/fb/sm501.txt   |  2 +-
 Documentation/fb/sstfb.txt   |  2 +-
 Documentation/filesystems/path-lookup.txt|  2 +-
 Documentation/filesystems/proc.txt   |  4 ++--
 Documentation/filesystems/sharedsubtree.txt  |  2 +-
 Documentation/gpio/consumer.txt  |  2 +-
 Documentation/hid/uhid.txt   |  2 +-
 Documentation/input/alps.txt |  2 +-
 Documentation/input/input.txt|  2 +-
 Documentation/ioctl/hdio.txt |  4 ++--
 Documentation/mtd/nand/pxa3xx-nand.txt   |  2 +-
 Documentation/networking/can.txt | 10 +-
 Documentation/networking/dccp.txt|  2 +-
 Documentation/networking/ip-sysctl.txt   | 10 +-
 Documentation/powerpc/transactional_memory.txt   |  2 +-
 Documentation/rbtree.txt |  2 +-
 Documentation/rfkill.txt |  2 +-
 Documentation/robust-futexes.txt |  2 +-
 Documentation/s390/monreader.txt |  2 +-
 Documentation/scsi/53c700.txt|  2 +-
 Documentation/scsi/dc395x.txt|  2 +-
 Documentation/scsi/ncr53c8xx.txt |  8 
 Documentation/scsi/scsi_mid_low_api.txt  |  8 
 Documentation/scsi/sym53c8xx_2.txt   |  6 +++---
 Documentation/scsi/tmscsim.txt   | 10 +-
 Documentation/security/Yama.txt  |  2 +-
 Documentation/serial/tty.txt |  4 ++--
 Documentation/sound/alsa/ALSA-Configuration.txt  |  4 ++--
 Documentation/sysctl/net.txt |  2 +-
 Documentation/trace/events.txt   |  2 +-
 Documentation/usb/WUSB-Design-overview.txt   |  2 +-
 Documentation/usb/mass-storage.txt   |  2 +-
 Documentation/virtual/kvm/api.txt|  2 +-
 Documentation/vm/transhuge.txt   |  4 ++--
 Documentation/workqueue.txt  |  2 +-
 Documentation/x86/earlyprintk.txt|  2 +-
 Documentation/x86/i386/IO-APIC.txt   |  2 +-
 57 files changed, 91 insertions(+), 91 deletions(-)

diff --git a/Documentation/DMA-attributes.txt b/Documentation/DMA-attributes.txt
index cc2450d..18dc52c 100644
--- a/Documentation/DMA-attributes.txt
+++ b/Documentation/DMA-attributes.txt
@@ -98,5 +98,5 @@ DMA_ATTR_FORCE_CONTIGUOUS
 By default DMA-mapping subsystem is allowed to assemble the buffer
 allocated by dma_alloc_attrs() function from individual pages if it can
 be mapped as contiguous chunk into device dma address space. By
-specifing this attribute the allocated buffer is forced to be contiguous
+specifying this attribute the allocated buffer is forced to be contiguous
 also in physical memory.
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 2101e71..104589b 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -732,7 +732,7 @@ 

Re: mm: kernel BUG at mm/swap.c:609!

2014-03-29 Thread Sasha Levin

On 03/20/2014 05:21 AM, Bob Liu wrote:


On 03/12/2014 09:25 AM, Bob Liu wrote:


On 03/12/2014 04:07 AM, Sasha Levin wrote:

Hi all,

While fuzzing with trinity inside a KVM tools guest running latest -next
kernel
I've stumbled on the following spew:

[  477.301955] kernel BUG at mm/swap.c:609!
[  477.302564] invalid opcode:  [#1] PREEMPT SMP DEBUG_PAGEALLOC
[  477.303590] Dumping ftrace buffer:
[  477.305022](ftrace buffer empty)
[  477.305899] Modules linked in:
[  477.306397] CPU: 35 PID: 10092 Comm: trinity-c374 Tainted: G
W3.14.0-rc5-next-20140307-sasha-00010-g1f812cb #142
[  477.307644] task: 8800a7f8 ti: 8800a7f6a000 task.ti:
8800a7f6a000
[  477.309124] RIP: 0010:[]  []
lru_cache_add+0x21/0x60
[  477.310301] RSP: :8800a7f6bbc8  EFLAGS: 00010292
[  477.30] RAX: 003f RBX: ea0013d68000 RCX:
0006
[  477.30] RDX: 0006 RSI: 8800a7f80d60 RDI:
0282
[  477.30] RBP: 8800a7f6bbc8 R08: 0001 R09:
0001
[  477.30] R10: 0001 R11: 0001 R12:
8800ab9b0c00
[  477.30] R13: 0240 R14: 8800ab9b0c00 R15:
0001
[  477.30] FS:  7ff2c047c700() GS:88042bc0()
knlGS:
[  477.30] CS:  0010 DS:  ES:  CR0: 8005003b
[  477.30] CR2: 03788a68 CR3: a7f68000 CR4:
06a0
[  477.30] DR0: 0069b000 DR1:  DR2:

[  477.30] DR3:  DR6: 0ff0 DR7:
0600
[  477.30] Stack:
[  477.30]  8800a7f6bbf8 812adaec ea0013d68000
ea002bdb8000
[  477.30]  ea0013d68000 8800a7f7c090 8800a7f6bca8
812db8ec
[  477.30]  0001 812e1321 8800a7f6bc48
811ad632
[  477.30] Call Trace:
[  477.30]  [] page_add_new_anon_rmap+0x1ec/0x210
[  477.30]  []
migrate_misplaced_transhuge_page+0x55c/0x830
[  477.30]  [] ? do_huge_pmd_numa_page+0x311/0x460
[  477.30]  [] ? __lock_release+0x1e2/0x200
[  477.30]  [] do_huge_pmd_numa_page+0x32f/0x460
[  477.30]  [] ? delay_tsc+0xfa/0x120
[  477.30]  [] __handle_mm_fault+0x244/0x3a0
[  477.30]  [] ? rcu_read_unlock+0x5d/0x60
[  477.30]  [] handle_mm_fault+0x113/0x1c0
[  477.30]  [] ? __do_page_fault+0x302/0x5d0
[  477.30]  [] __do_page_fault+0x591/0x5d0
[  477.30]  [] ? vtime_account_user+0x96/0xb0
[  477.30]  [] ? preempt_count_sub+0xe2/0x120
[  477.30]  [] ?
context_tracking_user_exit+0x187/0x1d0
[  477.30]  [] do_page_fault+0x45/0x70
[  477.30]  [] do_async_page_fault+0x36/0x100
[  477.30]  [] async_page_fault+0x28/0x30
[  477.30] Code: 65 f0 4c 8b 6d f8 c9 c3 66 90 55 48 89 e5 66 66 66
66 90 48 8b 07 a8 40 74 18 48 8b 07 a9 00 00 10 00 74 0e 31 f6 e8 2f 20
ff ff <0f> 0b eb fe 0f 1f 00 48 8b 07 a8 20 74 19 31 f6 e8 1a 20 ff ff
[  477.30] RIP  [] lru_cache_add+0x21/0x60
[  477.30]  RSP 




If PageUnevictable(old_page) is true, new page will also be set before
page_add_new_anon_rmap().

migrate_misplaced_transhuge_page()
 > migrate_page_copy()
 > SetPageUnevictable(newpage)
 > page_add_new_anon_rmap()

But in page_add_new_anon_rmap(), there is only mlocked_vma_newpage()
called to check whether a page should be added to unevictable list. I
think that is incorrect in some cases and may trigger this BUG().

We can see from vmscan:
int page_evictable(struct page *page)
{
 return !mapping_unevictable(page_mapping(page)) && !PageMlocked(page);
}

Besides mlock, we may also set a page to unevictable when that page's
mapping marked unevictable.

mlocked_vma_newpage(new_page) can't detect this situation if the old
page is set to unevictable by this reason. So I think we should add an
extra !PageUnevictable(page) checking in page_add_new_anon_rmap().
Fix me if I misunderstood something.

diff --git a/mm/rmap.c b/mm/rmap.c
index 9056a1f..8d13318 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1024,7 +1024,7 @@ void page_add_new_anon_rmap(struct page *page,
 __mod_zone_page_state(page_zone(page), NR_ANON_PAGES,
 hpage_nr_pages(page));
 __page_set_anon_rmap(page, vma, address, 1);
-   if (!mlocked_vma_newpage(vma, page)) {
+   if (!mlocked_vma_newpage(vma, page) && !PageUnevictable(page)) {
 SetPageActive(page);
 lru_cache_add(page);
 } else




Sasha, any lucky with above changes? If it can fix this issue, I'll
resend out a patch.


I've been running with it for a while and haven't seen the issue reproduce,
looks good to me.


Thanks,
Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] rds: prevent dereference of a NULL device in rds_iw_laddr_check

2014-03-29 Thread Sasha Levin
Binding might result in a NULL device which is later dereferenced
without checking.

Signed-off-by: Sasha Levin 
---
 net/rds/iw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/rds/iw.c b/net/rds/iw.c
index 7826d46..0298920 100644
--- a/net/rds/iw.c
+++ b/net/rds/iw.c
@@ -239,7 +239,8 @@ static int rds_iw_laddr_check(__be32 addr)
ret = rdma_bind_addr(cm_id, (struct sockaddr *));
/* due to this, we will claim to support IB devices unless we
   check node_type. */
-   if (ret || cm_id->device->node_type != RDMA_NODE_RNIC)
+   if (ret || !cm_id->device ||
+   cm_id->device->node_type != RDMA_NODE_RNIC)
ret = -EADDRNOTAVAIL;
 
rdsdebug("addr %pI4 ret %d node type %d\n",
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mtd: diskonchip: mem resource name is not optional

2014-03-29 Thread Sasha Levin

On 03/22/2014 04:39 AM, Alexander Shiyan wrote:

Wed, 19 Mar 2014 18:24:37 -0400 от Sasha Levin :

Passing a name to request_mem_region() isn't optional and can't just
be NULL. Passing NULL causes a NULL ptr deref later in the boot
process.

Signed-off-by: Sasha Levin 
---
  drivers/mtd/nand/diskonchip.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
index b9b4db6..f68a7bc 100644
--- a/drivers/mtd/nand/diskonchip.c
+++ b/drivers/mtd/nand/diskonchip.c
@@ -1439,7 +1439,7 @@ static int __init doc_probe(unsigned long physadr)
int reg, len, numchips;
int ret = 0;

-   if (!request_mem_region(physadr, DOC_IOREMAP_LEN, NULL))
+   if (!request_mem_region(physadr, DOC_IOREMAP_LEN, "DiskOnChip"))
return -EBUSY;
virtadr = ioremap(physadr, DOC_IOREMAP_LEN);
if (!virtadr) {
--


Tested-by: Alexander Shiyan 


It seems that no one pulled this patch anywhere. It fixes a straightforward
boot failure on boot when diskonchip is enabled in the config.

Someone grab it please?


Thanks,
Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: kernfs/rtc: circular dependency between kernfs and ops_lock

2014-03-29 Thread Sasha Levin

On 03/25/2014 08:19 PM, Sasha Levin wrote:

On 03/25/2014 06:39 PM, Alessandro Zummo wrote:

On Tue, 25 Mar 2014 17:52:30 -0400
Sasha Levin  wrote:



   Pretty interesting indeed. One option would be to remove
   the sys files before acquiring the lock. But I wonder
   if this could lead to other issues.



Ping? Seems this thing got lost.


  What if we move

rtc_sysfs_del_device(rtc);

  before acquiring the lock?


Trying it now, I'll leave it going for a week and see if it reproduces.


Look good, thanks!


Thanks,
Sasha

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: BAR 14: can't assign mem (size 0x200000)

2014-03-29 Thread Parag Warudkar
On Sat, Mar 29, 2014 at 1:19 PM, Bjorn Helgaas  wrote:
> [+cc Rafael, linux-pci, linux-acpi]
>
> On Sat, Mar 29, 2014 at 09:41:20AM -0700, Linus Torvalds wrote:

>> Parag, can you add a WARN_ON_ONCE() to that message, so that we see
>> what the call chain is for it.
>
> I think we likely get a Bus Check notification when resuming, so we're
> probably in this path:
>
> acpi_hotplug_notify_cb
>   acpi_hotplug_execute(acpi_device_hotplug, ...)
> acpi_device_hotplug
>   acpi_scan_bus_check
> acpi_pci_root_scan_dependent# .hotplug.scan_dependent
>   acpiphp_check_host_bridge
> acpiphp_check_bridge
>   enable_slot
> pcibios_resource_survey_bus
>   dev_printk("Allocating resources")
>
> It seems like we ought to do the equivalent of a Bus Check from the
> root at boot-time, even if we don't receive an explicit Bus Check
> notification then (ACPI 5.0, sec 5.6.6, says "OSPM will typically
> perform a full enumeration automatically at boot time, but after
> system initialization it is the responsibility of the ACPI AML code to
> notify OSPM whenever a re-enumeration operation is required"), but I
> don't think we do, which makes the resume path different from the boot
> path.
>
> Parag, would you mind collecting an acpidump and attaching it to the
> bugzilla below?

I have attached a single acpidump to the bugzilla.

I realized that I misspoke when I said VTd makes a difference.
Actually on 3.14 exact same message appears on resume irrespective of
whether or not VTd is enabled.

However on 3.11 (3.11.0-18-generic Ubuntu LTS latest kernel) - I don't
see those messages irrespective of VTd status.
I must have accidentally booted into 3.11 kernel after disabling VTd
and thought the messages went away because of disabling VTd.

So we can ignore the VTd part.

>
> Is this a regression?  I guess you said that the message (and the sec-
> latency change, which I don't think is applicable to PCIe anyway) are
> the only ill effects you see, so it might not be too serious even if
> it is.

Not sure if Ubuntu includes any patches on top of 3.11 mainline that
make a difference to this issue - but in case they don't this might be
a regression.
About the seriousness part - I am not seeing any issues in my regular
use. Not sure what that bridge does and if there are any specific
devices involved - so it might just be that I am not using anything
that could be problematic due to this issue.

Thanks,

Parag
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/3] staging/ozwpan: coding style ether_addr_copy

2014-03-29 Thread Dan Carpenter
On Fri, Mar 28, 2014 at 06:08:27AM -0700, Joe Perches wrote:
> (adding Andrew Morton, David Miller and LKML to cc's)
> 
> On Fri, 2014-03-28 at 14:18 +0300, Dan Carpenter wrote:
> > On Fri, Mar 14, 2014 at 12:39:11AM +0900, Jérôme Pinot wrote:
> > > On 03/13/14 02:28, Greg Kroah-Hartman wrote:
> > > > On Thu, Mar 13, 2014 at 10:21:44AM +0900, Jérôme Pinot wrote:
> > > [...]
> > > > > diff --git a/drivers/staging/ozwpan/ozcdev.c 
> > > > > b/drivers/staging/ozwpan/ozcdev.c
> > > > > index 5de5981..10c0a96 100644
> > > > > --- a/drivers/staging/ozwpan/ozcdev.c
> > > > > +++ b/drivers/staging/ozwpan/ozcdev.c
> > > > > @@ -217,7 +217,7 @@ static int oz_set_active_pd(const u8 *addr)
> > > > >   pd = oz_pd_find(addr);
> > > > >   if (pd) {
> > > > >   spin_lock_bh(_cdev.lock);
> > > > > - memcpy(g_cdev.active_addr, addr, ETH_ALEN);
> > > > > + ether_addr_copy(g_cdev.active_addr, addr);
> > > > 
> > > > Are you sure this will work?
> > > 
> > > No. But the ozwpan driver uses already ether_addr_equal which is not
> > > alignment-safe. As
> > > https://www.kernel.org/doc/Documentation/unaligned-memory-access.txt 
> > > said:
> > > 
> > > "This alignment-unsafe function is still useful as it is a decent
> > > optimization for the cases when you can ensure alignment, which is
> > > true almost all of the time in ethernet networking context."
> > > 
> > > I expected the maintainer to confirm/infirm this. I'm just seeing that's
> > > actually Chris Kelly who did write this part of code, so I'm CC'ing him
> > > too.
> > > 
> > 
> > It is aligned ok, but don't rely on the maintainer to fix your bugs.
> > Don't send patches which you are not sure about.
> > 
> > Joe, this seems like a very bad warning message from checkpatch.pl
> > because people will constantly send us patches over and over which
> > introduce bugs and they rely on the maintainer to catch it every time.
> > Can we get rid of the warning or move it under --strict or something?
> 
> Hi Dan.
> 
> Maybe.
> 
> The checkpatch message is:
> 
> "Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are 
> __aligned(2)"
> 
> My personal preference would be to add YA inline function
> for unaligned copies ether_addr_copy_unaligned for symmetry
> to ether_addr_equal_unaligned to etherdevice.h though.
> 
> Then the message could be changed to something like
> "Prefer ether_addr_copy[_unaligned] to memcpy(foo, bar, ETH_ALEN)"
> 

Sure if we had a function which didn't introduce bugs then that would be
great.  As it is submitters ignore the alignment requirements and rely
on us to catch bugs.

In Smatch, I constantly explain to people that I don't care about false
positives because this is not GCC where you have to eliminate every
warning.  These days in the kernel we treat checkpatch.pl and GCC
warnings the same so it sucks when they are something conditional.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


xfs i_lock vs mmap_sem lockdep trace.

2014-03-29 Thread Dave Jones
Not sure if I've reported this already (it looks familiar, though I've not 
managed
to find it in my sent mail folder).  This is rc8 + a diff to fix the stack 
usage reports
I was seeing (diff at http://paste.fedoraproject.org/89854/13210913/raw)

 ==
 [ INFO: possible circular locking dependency detected ]
 3.14.0-rc8+ #153 Not tainted
 ---
 git/32710 is trying to acquire lock:
  (&(>i_lock)->mr_lock){.+}, at: [] 
xfs_ilock+0x122/0x250 [xfs]
 
but task is already holding lock:
  (>mmap_sem){++}, at: [] __do_page_fault+0x14a/0x610

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (>mmap_sem){++}:
[] lock_acquire+0x91/0x1c0
[] might_fault+0x8c/0xb0
[] filldir+0x91/0x120
[] xfs_dir2_leaf_getdents+0x332/0x450 [xfs]
[] xfs_readdir+0x1fe/0x260 [xfs]
[] xfs_file_readdir+0x2b/0x40 [xfs]
[] iterate_dir+0xa8/0xe0
[] SyS_getdents+0x9a/0x130
[] tracesys+0xdd/0xe2
 
-> #0 (&(>i_lock)->mr_lock){.+}:
[] __lock_acquire+0x181e/0x1bd0
[] lock_acquire+0x91/0x1c0
[] down_read_nested+0x52/0xa0
[] xfs_ilock+0x122/0x250 [xfs]
[] xfs_ilock_data_map_shared+0x1f/0x40 [xfs]
[] __xfs_get_blocks+0xc7/0x840 [xfs]
[] xfs_get_blocks+0x11/0x20 [xfs]
[] do_mpage_readpage+0x4a8/0x6f0
[] mpage_readpages+0xeb/0x160
[] xfs_vm_readpages+0x1d/0x20 [xfs]
[] __do_page_cache_readahead+0x2ea/0x390
[] ra_submit+0x21/0x30
[] filemap_fault+0x395/0x420
[] __do_fault+0x7f/0x570
[] handle_mm_fault+0x217/0xc40
[] __do_page_fault+0x1ae/0x610
[] do_page_fault+0x1e/0x70
[] page_fault+0x22/0x30
 
other info that might help us debug this:

  Possible unsafe locking scenario:

CPU0CPU1

   lock(>mmap_sem);
lock(&(>i_lock)->mr_lock);
lock(>mmap_sem);
   lock(&(>i_lock)->mr_lock);
 
 *** DEADLOCK ***

1 lock held by git/32710:
 #0:  (>mmap_sem){++}, at: [] 
__do_page_fault+0x14a/0x610

stack backtrace:
CPU: 1 PID: 32710 Comm: git Not tainted 3.14.0-rc8+ #153
 af69e650 5bc802c5 88006bc9f768 ae7a8da2
 af69e650 88006bc9f7a8 ae7a4e66 88006bc9f800
 880069c3dc30  880069c3dbf8 880069c3dc30
Call Trace:
 [] dump_stack+0x4e/0x7a
 [] print_circular_bug+0x201/0x20f
 [] __lock_acquire+0x181e/0x1bd0
 [] lock_acquire+0x91/0x1c0
 [] ? xfs_ilock+0x122/0x250 [xfs]
 [] ? xfs_ilock_data_map_shared+0x1f/0x40 [xfs]
 [] down_read_nested+0x52/0xa0
 [] ? xfs_ilock+0x122/0x250 [xfs]
 [] xfs_ilock+0x122/0x250 [xfs]
 [] xfs_ilock_data_map_shared+0x1f/0x40 [xfs]
 [] __xfs_get_blocks+0xc7/0x840 [xfs]
 [] ? __alloc_pages_nodemask+0x1ac/0xbb0
 [] xfs_get_blocks+0x11/0x20 [xfs]
 [] do_mpage_readpage+0x4a8/0x6f0
 [] ? __xfs_get_blocks+0x840/0x840 [xfs]
 [] ? get_parent_ip+0xd/0x50
 [] ? preempt_count_sub+0x6b/0xf0
 [] ? __lru_cache_add+0x65/0xc0
 [] mpage_readpages+0xeb/0x160
 [] ? __xfs_get_blocks+0x840/0x840 [xfs]
 [] ? __xfs_get_blocks+0x840/0x840 [xfs]
 [] ? alloc_pages_current+0x106/0x1f0
 [] xfs_vm_readpages+0x1d/0x20 [xfs]
 [] __do_page_cache_readahead+0x2ea/0x390
 [] ? __do_page_cache_readahead+0x120/0x390
 [] ra_submit+0x21/0x30
 [] filemap_fault+0x395/0x420
 [] __do_fault+0x7f/0x570
 [] handle_mm_fault+0x217/0xc40
 [] ? __lock_is_held+0x57/0x80
 [] __do_page_fault+0x1ae/0x610
 [] ? put_lock_stats.isra.28+0xe/0x30
 [] ? lock_release_holdtime.part.29+0xe6/0x160
 [] ? get_parent_ip+0xd/0x50
 [] ? context_tracking_user_exit+0x5f/0x190
 [] do_page_fault+0x1e/0x70
 [] page_fault+0x22/0x30

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] phy/at8031: enable at8031 to work on interrupt mode

2014-03-29 Thread David Miller
From: Zhao Qiang 
Date: Fri, 28 Mar 2014 15:39:41 +0800

> The at8031 can work on polling mode and interrupt mode.
> Add ack_interrupt and config intr funcs to enable
> interrupt mode for it.
> 
> Signed-off-by: Zhao Qiang 
> ---
> changes for v2:
>   - when interrupt is not enabled, write 0 to interrupt enbale register
>   - delete a inner parens not needed

Applied to net-next, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Regression, bisected 9e30cc] "sysfs, kernfs: no need to kern_mount() sysfs from sysfs_init()" prevents system from booting correctly

2014-03-29 Thread Alexandre Demers
That fixes the problem, I'm now running 3.14-rc8 with your patch 
applied.


Alexandre Demers

On Sat 29 Mar 2014 02:12:58 PM EDT, Tejun Heo wrote:

Hello, Alexander.

On Thu, Mar 27, 2014 at 01:47:53PM -0400, Alexandre Demers wrote:

I'll do my best, but I just don't have enough time right now for
everything I have to do at home and dig this bug. I may be able to
look at it in the next couple of days though, or it may go somewhere
next week... That being said, I tried yesterday to have a better idea
and I thank you for the "ScrLck" trick, I didn't know that it was
working. Nevertheless I didn't find anything.

It seems as if the transition from the temporary kernel's fs to the
hard disk's fs is not done correctly. If I boot with a working kernel
after that, I can't find any trace of where it was trying to copy the
files or of any partition being full. Could it be filling the RAM
until it reaches its maximum capacity (16GB to fill before hitting the
limit and throwing the errors)? That would explain at least why it
takes so much time before the flood of errors begins...


That could definitely be the case.  I'd really like to get to the
bottom of it.  It's really curious that there aren't more people
reporting the same problem.  Can you please try whether the following
patch makes the regression go away?

Thanks!

diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index a66ad61..a3223e2 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -75,5 +75,7 @@ int __init sysfs_init(void)
return err;
}

+   WARN_ON(IS_ERR(kern_mount(_fs_type)));
+
return 0;
  }

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V2] scripts: objdiff: detect object code changes between two commits

2014-03-29 Thread Michal Marek
Dne 24.3.2014 03:14, Jason Cooper napsal(a):
> 
> objdiff can be used in conjunction with a git rebase to confirm that
> each commit made no changes to the resulting object code.  It has the
> same return values as diff(1).

This looks nice. Just a few comments below:


> +# usage example:
> +#
> +# $ git checkout COMMIT_A
> +# $ 
> +# $ ./scripts/objdiff record path/to/*.o
> +#
> +# $ git checkout COMMIT_B
> +# $ 
> +# $ ./scripts/objdiff record path/to/*.o
> +#
> +# $ ./scripts/objdiff diff COMMIT_A COMMIT_B
> +# $
> +
> +# And to clean up (everything is in /tmp/objdiff-*)
> +# $ ./scripts/objdiff clean all

Can you change it to use some path in the source tree, like .tmp_objdiff
or so? Then you can have make distclean remove it and you can avoid the
fixed paths in /tmp.


> + # force rebuild
> + rm -f "$f"

Is this working around some kbuild bug, or is it more a "just in case?"
One usually assumes that "record" is a readonly operation and can be
repeated.

Thanks,
Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC 1/5] of: Add support for ePAPR "stdout-path" property

2014-03-29 Thread Benjamin Herrenschmidt
On Fri, 2014-03-28 at 16:56 -0500, Rob Herring wrote:

> I'm working on getting just that working. See my series for "generic
> earlycon". I'm working on cleaning up the FDT part still, but have
> something functional. The "hardest" part with FDT is doing the address
> translation for serial devices, but I just stole that from u-boot.
> 
> > Right now, I have this explicit config option to hard wire "early debug"
> > but there are a few cases of field bugs that can happen in early init
> > code which I'd like to see logged properly on those systems, and early
> > debug isn't suitable for field use...
> 
> We have the same issue with multi-platform ARM kernels.

Ah excellent, I'll keep an eye on it !

Cheers,
Ben.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] USB: serial: ftdi_sio: add id for Brainboxes serial cards

2014-03-29 Thread Michele Baldessari
Custom VID/PIDs for Brainboxes cards as reported in
https://bugzilla.redhat.com/show_bug.cgi?id=1071914

Signed-off-by: Michele Baldessari 
---
 drivers/usb/serial/ftdi_sio.c | 34 ++
 drivers/usb/serial/ftdi_sio_ids.h | 38 ++
 2 files changed, 72 insertions(+)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 44ab12986805..ccfa3c55212c 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -909,6 +909,40 @@ static const struct usb_device_id id_table_combined[] = {
{ USB_DEVICE(FTDI_VID, FTDI_Z3X_PID) },
/* Cressi Devices */
{ USB_DEVICE(FTDI_VID, FTDI_CRESSI_PID) },
+   /* Brainbox Devices */
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_001_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_001_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_012_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_023_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_034_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_101_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_257_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_313_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_324_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_357_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_1_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_2_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_3_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_4_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_5_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_6_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_7_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_8_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_1_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_2_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_3_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_4_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_346_1_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_346_2_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_606_1_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_606_2_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_606_3_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_701_1_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_701_2_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_1_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_2_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_3_PID) },
+   { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_4_PID) },
{ } /* Terminating entry */
 };
 
diff --git a/drivers/usb/serial/ftdi_sio_ids.h 
b/drivers/usb/serial/ftdi_sio_ids.h
index e599fbfcde5f..84d351e70f9c 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1326,3 +1326,41 @@
  * Manufacturer: Cressi
  */
 #define FTDI_CRESSI_PID0x87d0
+
+/*
+ * Product: Brainboxes devices
+ * Manufacturer: Brainboxes
+ */
+#define BRAINBOXES_VID 0x05d1
+#define BRAINBOXES_VX_001_PID  0x1001 /* VX-001 ExpressCard 1 Port 
RS232 */
+#define BRAINBOXES_VX_012_PID  0x1002 /* VX-012 ExpressCard 2 Port 
RS232 */
+#define BRAINBOXES_VX_023_PID  0x1003 /* VX-023 ExpressCard 1 Port 
RS422/485 */
+#define BRAINBOXES_VX_034_PID  0x1004 /* VX-034 ExpressCard 2 Port 
RS422/485 */
+#define BRAINBOXES_US_101_PID  0x1011 /* US-101 1xRS232 */
+#define BRAINBOXES_US_257_PID  0x5001 /* US-257 2xRS232 1Mbaud */
+#define BRAINBOXES_US_313_PID  0x6001 /* US-313 2xRS422/485 1Mbaud */
+#define BRAINBOXES_US_324_PID  0x1013 /* US-324 1xRS422/485 1Mbaud */
+#define BRAINBOXES_US_357_PID  0x7001 /* US_357 1xRS232/422/485 */
+#define BRAINBOXES_US_160_1_PID0x9001 /* US-160 16xRS232 
1Mbaud Port 1 and 2 */
+#define BRAINBOXES_US_160_2_PID0x9002 /* US-160 16xRS232 
1Mbaud Port 3 and 4 */
+#define BRAINBOXES_US_160_3_PID0x9003 /* US-160 16xRS232 
1Mbaud Port 5 and 6 */
+#define BRAINBOXES_US_160_4_PID0x9004 /* US-160 16xRS232 
1Mbaud Port 7 and 8 */
+#define BRAINBOXES_US_160_5_PID0x9005 /* US-160 16xRS232 
1Mbaud Port 9 and 10 */
+#define BRAINBOXES_US_160_6_PID0x9006 /* US-160 16xRS232 
1Mbaud Port 11 and 12 */
+#define BRAINBOXES_US_160_7_PID0x9007 /* US-160 16xRS232 
1Mbaud Port 13 and 14 */
+#define BRAINBOXES_US_160_8_PID0x9008 /* US-160 16xRS232 
1Mbaud Port 15 and 16 */
+#define BRAINBOXES_US_279_1_PID0x2021 /* US-279 8xRS422 1Mbaud 
Port 1 and 2 

Re: [PATCH] Coccicheck: Remove memcpy to struct assignment test

2014-03-29 Thread Michal Marek
Dne 19.3.2014 17:48, Greg Kroah-Hartman napsal(a):
 On Die, 2014-03-18 at 22:11 +0100, Peter Senna Tschudin wrote:
> The Coccinelle script scripts/coccinelle/misc/memcpy-assign.cocci look
> for opportunities to replace a call to memcpy by a struct assignment.
> This patch removes memcpy-assign.cocci as it is not clear that this
> convention has an impact on the generated code.
[...]
> Can someone please just remove the check from the kernel as I'm getting
> tired of rejecting patches that do this...

I just applied Peter's revert to kbuild.git#misc.

Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: 3.0 -> 3.10 regression? poweroff instead of reboot?

2014-03-29 Thread Winkler, Tomas
> (CC Tomas Winkler)
> 
> So finally I got some time to look deeper into this, and the problem
> might not be regression after all.. It is caused by mei_me module,
> blacklisting it "fixes it" for me.
> 
> So for me it's kinda of solution, although I guess MEI related people
> might be interested in it..
> 
> If I could be of any help, please let me know - at least I've got hardware
> on which I can reproduce the problem..
> 
> BR
> 
> nik
> 
> 
> On Mon, Mar 10, 2014 at 03:55:30PM +0100, Nikola Ciprich wrote:
> > Hi,
> >
> > after installing new server, we've noticed weird behaviour: when box is
> > about to reboot, it powers off instead. This was with 3.10.33, downgrading
> > to 3.0.101 seems to fix this problem. I didn't have time to play with it 
> > today
> > and box had to be shipped today, so it'll take few days before I'll have 
> > chance
> > for further research, but I wanted to ask whether somebody has met similar
> > problem and what I should check first?
> >
> > The system is x86_64 centos 6, HW is supermicro x9sci-ln4f.
> >
> > Any help appreciated
> >
> > When I have chance to put my hands on this box again, I'll try
> > latest kernel and I can also do bisect, if needed.
> >
> > BR
> >
> > nik

If this is a server platform can you please try this patch 
https://lkml.org/lkml/2014/3/25/396

Thanks
Tomas

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] x86: Fix the symbol versions on the 32-bit vDSO

2014-03-29 Thread Andy Lutomirski
The new symbols provide the same API as the 64-bit variants, so they
should have the same symbol version name.  This can't break
userspace, since these symbols are new for 32-bit Linux.

Signed-off-by: Andy Lutomirski 
---
 arch/x86/vdso/vdso32/vdso32.lds.S | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/x86/vdso/vdso32/vdso32.lds.S 
b/arch/x86/vdso/vdso32/vdso32.lds.S
index 28c4607..aadb8b9 100644
--- a/arch/x86/vdso/vdso32/vdso32.lds.S
+++ b/arch/x86/vdso/vdso32/vdso32.lds.S
@@ -23,14 +23,18 @@ ENTRY(__kernel_vsyscall);
  */
 VERSION
 {
+   LINUX_2.6 {
+   global:
+   __vdso_clock_gettime;
+   __vdso_gettimeofday;
+   __vdso_time;
+   };
+
LINUX_2.5 {
global:
__kernel_vsyscall;
__kernel_sigreturn;
__kernel_rt_sigreturn;
-   __vdso_clock_gettime;
-   __vdso_gettimeofday;
-   __vdso_time;
local: *;
};
 }
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] checkpatch: Expand parenthesis alignment test to declarations, functions and assignments

2014-03-29 Thread Joe Perches
Currently the parenthesis alignment test works only on
misalignments of if statements like

if (foo(bar,
baz)

Expand the test to find misalignments like:

static inline int foo(int bar,
int baz)

and

foo(bar,
baz);

and

foo = bar(baz,
qux);

Expand the $Inline keyword for __inline and __inline__ too.
Add $Inline to $Declare so it also matches "static inline ".

Signed-off-by: Joe Perches 
---
 scripts/checkpatch.pl | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 889929d..1e63973 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -281,7 +281,7 @@ our $Attribute  = qr{
__weak
  }x;
 our $Modifier;
-our $Inline= qr{inline|__always_inline|noinline};
+our $Inline= qr{inline|__always_inline|noinline|__inline|__inline__};
 our $Member= qr{->$Ident|\.$Ident|\[[^]]*\]};
 our $Lval  = qr{$Ident(?:$Member)*};
 
@@ -435,7 +435,7 @@ sub build_types {

(?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)?
(?:\s+$Inline|\s+$Modifier)*
  }x;
-   $Declare= qr{(?:$Storage\s+)?$Type};
+   $Declare= qr{(?:$Storage\s+(?:$Inline\s+)?)?$Type};
 }
 build_types();
 
@@ -1613,7 +1613,7 @@ sub pos_last_openparen {
}
}
 
-   return $last_openparen + 1;
+   my $ts = length(expand_tabs(substr($line, 0, $last_openparen))) + 1;
 }
 
 sub process {
@@ -2200,7 +2200,7 @@ sub process {
 
 # check multi-line statement indentation matches previous line
if ($^V && $^V ge 5.10.0 &&
-   $prevline =~ /^\+(\t*)(if \(|$Ident\().*(\&\&|\|\||,)\s*$/) 
{
+   $prevline =~ /^\+([ 
\t]*)((?:$c90_Keywords(?:\s+if)\s*)|(?:$Declare\s*)?(?:$Ident|\(\s*\*\s*$Ident\s*\))\s*|$Ident\s*=\s*$Ident\s*)\(.*(\&\&|\|\||,)\s*$/)
 {
$prevline =~ /^\+(\t*)(.*)$/;
my $oldindent = $1;
my $rest = $2;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] kbuild: unconditionally clobber include/linux/version.h on distclean

2014-03-29 Thread Michal Marek
Dne 13.2.2014 22:28, Paul Gortmaker napsal(a):
> As of v3.7, the UAPI changes relocated headers around such that the
> kernel version header lived in a new place.
> 
> If a person is bisecting and if you go back to pre-UAPI days,
> you will create an include/linux/version.h  -- then if you checkout a
> post-UAPI kernel, and even run "make distclean" it still won't delete
> that old version file.  So you get a situation like this:
> 
> $ grep -R LINUX_VERSION_CODE include/
> include/generated/uapi/linux/version.h:#define LINUX_VERSION_CODE 200192
> include/linux/version.h:#define LINUX_VERSION_CODE 132646
> 
> The value in that second line is representative of a v2.6.38 version.
> And it will be sourced/used, hence leading to strange behaviours, such
> as drivers/staging content (which typically hasn't been purged of version
> ifdefs) failing to build.
> 
> Since it is a subtle mode of failure, lets always clobber the old
> file when doing a distclean.
> 
> Cc: Michal Marek 
> Cc: David Howells 
> Signed-off-by: Paul Gortmaker 

Applied to kbuild.git, sorry for the delay. I'm curious how long will it
take until somebody posts a cleanup patch removing the obsolete
include/linux/version.h reference...

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 0/9] Use regmap+devm+DT in pm8xxx input drivers

2014-03-29 Thread Dmitry Torokhov
On Tue, Mar 04, 2014 at 10:34:39AM -0800, Stephen Boyd wrote:
> These patches move the pm8xxx input drivers over to use devm_* APIs
> and regmap. This breaks the dependency of these drivers on the pm8xxx
> specific read/write calls and also simplifies the probe code a bit.
> Finally we add devicetree support to these drivers so they can be probed
> on the platforms that are supported upstream.

Applied all (and folded DT binding patches into respective driver
changes).

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 0/4] Provide netdev naming-policy via sysfs

2014-03-29 Thread Kay Sievers
On Sat, Mar 29, 2014 at 8:37 PM, David Miller  wrote:
> From: Tom Gundersen 
> Date: Sat, 29 Mar 2014 10:46:02 +0100
>
>> The issue I see with that is that there are several ways to generate
>> predictable names, and the user may want to chose between them, so
>> this is arguably policy that should not be in the kernel. If you don't
>> think that's a problem, I'd be happy to submit a patch to move all
>> this logic from udev to the kernel, just let me know how you see it.
>
> Unfortunately, we have already allowed this kind of thing for setting
> MAC addresses so I guess I'll have to allow your changes to be applied.
>
> But before I ask you to resubmit, do you have full buy-in from the
> udev folks for this facility?

Absolutely, it is very useful to have.

Today, there is no way for userland to distinguish explicitly
requested and predictable names provided by tools, from unpredictable
names composed by the kernel itself by adding an unpredictable
enumeration number.

It allows us the work around the common problems in general purpose
Linux, where we have no strong dependencies, not necessarily central
management, and loose coupling between components.

This information will allow us to apply best-effort or common sense to
the default udev device name policies, like:
  - leave the name alone if someone has asked explicitly for that name
  - leave the name alone if someone else has already renamed it after
its first creation

So, having that information in /sys would be very welcome from udev's
point of view.

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 0/4] Provide netdev naming-policy via sysfs

2014-03-29 Thread David Miller
From: Tom Gundersen 
Date: Sat, 29 Mar 2014 10:46:02 +0100

> The issue I see with that is that there are several ways to generate
> predictable names, and the user may want to chose between them, so
> this is arguably policy that should not be in the kernel. If you don't
> think that's a problem, I'd be happy to submit a patch to move all
> this logic from udev to the kernel, just let me know how you see it.

Unfortunately, we have already allowed this kind of thing for setting
MAC addresses so I guess I'll have to allow your changes to be applied.

But before I ask you to resubmit, do you have full buy-in from the
udev folks for this facility?

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 1/1] Input: don't modify the id of ioctl-provided ff effect on upload failure

2014-03-29 Thread Dmitry Torokhov
On Sat, Mar 29, 2014 at 01:16:36PM +0100, Elias Vanderstuyft wrote:
> If a new (id == -1) ff effect was uploaded from userspace,
> ff-core.c::input_ff_upload() will have assigned
> a positive number to the new effect id.
> Currently, evdev.c::evdev_do_ioctl() will save this new id to userspace,
> regardless of whether the upload succeeded or not.
> 
> On upload failure, this can be confusing because the dev->ff->effects[] array
> will not contain an element at the index of that new effect id.
> 
> This patch fixes this by leaving the id unchanged after upload fails.
> 
> Note: Unfortunately applications should still expect changed effect id for
> quite some time.
> 
> This has been discussed on:
> http://www.mail-archive.com/linux-input@vger.kernel.org/msg08513.html
> ("ff-core effect id handling in case of a failed effect upload")
> 
> Suggested-by: Dmitry Torokhov 
> Signed-off-by: Elias Vanderstuyft 
> Cc: Anssi Hannula 
> Cc: Michal Malý 
> Cc: linux-in...@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org

Applied, thank you, and sorry for the delay.

> ---
>  v2:
>   Only added one line to the commit message to say
>   what this patch actually does,
>   instead of only stating the reason why it's submitted.
> 
>  drivers/input/evdev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
> index a06e125..ce953d8 100644
> --- a/drivers/input/evdev.c
> +++ b/drivers/input/evdev.c
> @@ -954,11 +954,13 @@ static long evdev_do_ioctl(struct file *file, unsigned 
> int cmd,
>   return -EFAULT;
>  
>   error = input_ff_upload(dev, , file);
> + if (error)
> + return error;
>  
>   if (put_user(effect.id, &(((struct ff_effect __user *)p)->id)))
>   return -EFAULT;
>  
> - return error;
> + return 0;
>   }
>  
>   /* Multi-number variable-length handlers */
> -- 
> 1.8.3.1
> 

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-29 Thread Conrad Meyer
When possible, infer DOS 2.x BIOS Parameter Block from block device
geometry (for floppies and floppy images). Update in-memory only. We
only perform this update when the entire BPB region is zeroed, like
produced by DOS 1.x-era FORMAT (and other OEM variations on DOS).

Fixes kernel.org bug #42617.

BPB default values are inferred from media size and a table.[0] Media
size is assumed to be static for archaic FAT volumes. See also [1].

[0]: https://en.wikipedia.org/wiki/File_Allocation_Table#Exceptions
[1]: http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html

Signed-off-by: Conrad Meyer 
---
Diff from v3.14-rc8.

Changes since v1:
  * Check for FAT bootstrap prefix (EB xx 90) to help avoid conflicting with
other filesystems
  * Move default from a switch to a static table

Thanks!
---
 fs/fat/inode.c | 93 ++
 1 file changed, 93 insertions(+)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 854b578..c31fbdc 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -35,9 +35,47 @@
 #define CONFIG_FAT_DEFAULT_IOCHARSET   ""
 #endif
 
+#define KB_IN_SECTORS 2
+
 static int fat_default_codepage = CONFIG_FAT_DEFAULT_CODEPAGE;
 static char fat_default_iocharset[] = CONFIG_FAT_DEFAULT_IOCHARSET;
 
+static struct fat_floppy_defaults {
+   unsigned nr_sectors;
+   unsigned sec_per_clus;
+   unsigned dir_entries;
+   unsigned media;
+   unsigned fat_length;
+} floppy_defaults[] = {
+{
+   .nr_sectors = 160 * KB_IN_SECTORS,
+   .sec_per_clus = 1,
+   .dir_entries = 64,
+   .media = 0xFE,
+   .fat_length = 1,
+},
+{
+   .nr_sectors = 180 * KB_IN_SECTORS,
+   .sec_per_clus = 1,
+   .dir_entries = 64,
+   .media = 0xFC,
+   .fat_length = 2,
+},
+{
+   .nr_sectors = 320 * KB_IN_SECTORS,
+   .sec_per_clus = 2,
+   .dir_entries = 112,
+   .media = 0xFF,
+   .fat_length = 1,
+},
+{
+   .nr_sectors = 360 * KB_IN_SECTORS,
+   .sec_per_clus = 2,
+   .dir_entries = 112,
+   .media = 0xFD,
+   .fat_length = 2,
+},
+{ 0 } };
 
 static int fat_add_cluster(struct inode *inode)
 {
@@ -1246,6 +1284,58 @@ static unsigned long calc_fat_clusters(struct 
super_block *sb)
 }
 
 /*
+ * If this FAT filesystem is archaic (lacking a BIOS Parameter Block, ca. DOS
+ * 1.x), fix it up in-place by creating a DOS 2.x BIOS Parameter Block from
+ * defaults for the media size.
+ */
+static void fat_update_archaic_boot_sector(struct super_block *sb,
+   struct fat_boot_sector *b)
+{
+   struct fat_floppy_defaults *di;
+   sector_t bd_sects;
+
+   /* 16-bit DOS 1.x reliably wrote bootstrap short-jmp code */
+   if (b->ignored[0] != 0xeb || b->ignored[2] != 0x90)
+   return;
+
+   /*
+* If any value in this region is non-zero, don't assume it is archaic
+* DOS.
+*/
+   if (get_unaligned_le16(>sector_size) != 0 || b->sec_per_clus != 0 ||
+   b->reserved != 0 || b->fats != 0 ||
+   get_unaligned_le16(>dir_entries) != 0 ||
+   get_unaligned_le16(>sectors) != 0 || b->media != 0 ||
+   b->fat_length != 0 || b->secs_track != 0 || b->heads != 0 ||
+   b->secs_track != 0 || b->heads != 0)
+   return;
+
+   bd_sects = part_nr_sects_read(sb->s_bdev->bd_part);
+   for (di = floppy_defaults; di->nr_sectors; di++) {
+   if (di->nr_sectors == bd_sects)
+   break;
+   }
+   if (di->nr_sectors == 0) {
+   fat_msg(sb, KERN_WARNING,
+   "DOS volume lacks BPB and isn't a recognized floppy 
size (%ld sectors)",
+   (long)bd_sects);
+   return;
+   }
+
+   fat_msg(sb, KERN_INFO,
+   "Volume lacks BPB but looks like archaic DOS; assuming default 
BPB values");
+
+   b->sec_per_clus = di->sec_per_clus;
+   put_unaligned_le16(di->dir_entries, >dir_entries);
+   b->media = di->media;
+   b->fat_length = cpu_to_le16(di->fat_length);
+   put_unaligned_le16(SECTOR_SIZE, >sector_size);
+   b->reserved = cpu_to_le16(1);
+   b->fats = 2;
+   put_unaligned_le16(bd_sects, >sectors);
+}
+
+/*
  * Read the super block of an MS-DOS FS.
  */
 int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
@@ -1297,6 +1387,8 @@ int fat_fill_super(struct super_block *sb, void *data, 
int silent, int isvfat,
}
 
b = (struct fat_boot_sector *) bh->b_data;
+   fat_update_archaic_boot_sector(sb, b);
+
if (!b->reserved) {
if (!silent)
fat_msg(sb, KERN_ERR, "bogus number of reserved 
sectors");
@@ -1364,6 +1456,7 @@ int fat_fill_super(struct super_block *sb, void *data, 
int silent, int isvfat,
goto out_fail;
}
b = (struct fat_boot_sector *) bh->b_data;
+   fat_update_archaic_boot_sector(sb, b);
 

[PATCH v2] mm/readahead.c: inline ra_submit

2014-03-29 Thread Fabian Frederick
f9acc8c7b35a ("readahead: sanify file_ra_state names")
left ra_submit with a single function call.

Move ra_submit to internal.h and inline it to save some stack.
Thanks to Andrew Morton for commenting different versions.

Suggested-by: Andrew Morton 
Cc: linux...@kvack.org
Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 include/linux/mm.h |  3 ---
 mm/internal.h  | 15 +++
 mm/readahead.c | 21 +++--
 3 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index c1b7414..c8ecf29 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1847,9 +1847,6 @@ void page_cache_async_readahead(struct address_space 
*mapping,
unsigned long size);
 
 unsigned long max_sane_readahead(unsigned long nr);
-unsigned long ra_submit(struct file_ra_state *ra,
-   struct address_space *mapping,
-   struct file *filp);
 
 /* Generic expand stack which grows the stack according to GROWS{UP,DOWN} */
 extern int expand_stack(struct vm_area_struct *vma, unsigned long address);
diff --git a/mm/internal.h b/mm/internal.h
index 29e1e76..51f309c 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -11,6 +11,7 @@
 #ifndef __MM_INTERNAL_H
 #define __MM_INTERNAL_H
 
+#include 
 #include 
 
 void free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *start_vma,
@@ -21,6 +22,20 @@ static inline void set_page_count(struct page *page, int v)
atomic_set(>_count, v);
 }
 
+extern int __do_page_cache_readahead(struct address_space *mapping,
+   struct file *filp, pgoff_t offset, unsigned long nr_to_read,
+   unsigned long lookahead_size);
+
+/*
+ * Submit IO for the read-ahead request in file_ra_state.
+ */
+static inline unsigned long ra_submit(struct file_ra_state *ra,
+   struct address_space *mapping, struct file *filp)
+{
+   return __do_page_cache_readahead(mapping, filp,
+   ra->start, ra->size, ra->async_size);
+}
+
 /*
  * Turn a non-refcounted page (->_count == 0) into refcounted with
  * a count of one.
diff --git a/mm/readahead.c b/mm/readahead.c
index 0de2360..4d9f4c2 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -8,9 +8,7 @@
  */
 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -20,6 +18,8 @@
 #include 
 #include 
 
+#include "internal.h"
+
 /*
  * Initialise a struct file's readahead state.  Assumes that the caller has
  * memset *ra to zero.
@@ -149,8 +149,7 @@ out:
  *
  * Returns the number of pages requested, or the maximum amount of I/O allowed.
  */
-static int
-__do_page_cache_readahead(struct address_space *mapping, struct file *filp,
+int __do_page_cache_readahead(struct address_space *mapping, struct file *filp,
pgoff_t offset, unsigned long nr_to_read,
unsigned long lookahead_size)
 {
@@ -244,20 +243,6 @@ unsigned long max_sane_readahead(unsigned long nr)
 }
 
 /*
- * Submit IO for the read-ahead request in file_ra_state.
- */
-unsigned long ra_submit(struct file_ra_state *ra,
-  struct address_space *mapping, struct file *filp)
-{
-   int actual;
-
-   actual = __do_page_cache_readahead(mapping, filp,
-   ra->start, ra->size, ra->async_size);
-
-   return actual;
-}
-
-/*
  * Set the initial window size, round to next power of 2 and square
  * for small size, x 4 for medium, and x 2 for large
  * for 128k (32 page) max ra
-- 
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [BUG] 3.14-rc6 at mousedev_open_device+0x77/0x100

2014-03-29 Thread Matthias Beyer
Hi,

I want to add that my suspend is broken too. And I don't know if this has
any to do with the reported issues.

On 29-03-2014 12:15:35, Matthias Beyer wrote:
> Hi,
> 
> I got this error with 3.13.7, which I just installed:
> 
> ---
> 
> Mär 29 11:53:05 fu kernel: BUG: unable to handle kernel NULL pointer 
> dereference at   (null)
> Mär 29 11:53:05 fu kernel: IP: [] 
> mousedev_open_device+0x77/0x100 [mousedev]
> Mär 29 11:53:05 fu kernel: PGD 400853067 PUD 400852067 PMD 0 
> Mär 29 11:53:05 fu kernel: Oops:  [#1] PREEMPT SMP 
> Mär 29 11:53:05 fu kernel: Modules linked in: mousedev(+) btusb bluetooth 
> intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm btrfs 
> iTCO_wdt iTCO_vendor_support snd_hda_codec_hdmi snd_hda_codec_conexant 
> raid6_pq libcrc32c xor nls_cp437 vfat fat arc4 iwldvm mac80211 microcode 
> evdev pcspkr psmouse se
> Mär 29 11:53:05 fu kernel:  crc32c_intel ghash_clmulni_intel aesni_intel 
> aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd ehci_pci sdhci_pci 
> ehci_hcd sdhci scsi_mod mmc_core usbcore usb_common i8042 serio
> Mär 29 11:53:05 fu kernel: CPU: 2 PID: 764 Comm: acpid Tainted: G   O 
> 3.13.7-1-ARCH #1
> Mär 29 11:53:05 fu kernel: Hardware name: LENOVO 4290A11/4290A11, BIOS 
> 8DET66WW (1.36 ) 10/22/2012
> Mär 29 11:53:05 fu kernel: task: 8804068c2400 ti: 88007fc62000 
> task.ti: 88007fc62000
> Mär 29 11:53:05 fu kernel: RIP: 0010:[]  
> [] mousedev_open_device+0x77/0x100 [mousedev]
> Mär 29 11:53:05 fu kernel: RSP: 0018:88007fc63c10  EFLAGS: 00010202
> Mär 29 11:53:05 fu kernel: RAX:  RBX: 880406ded000 RCX: 
> 880406ded068
> Mär 29 11:53:05 fu kernel: RDX:  RSI:  RDI: 
> 0246
> Mär 29 11:53:05 fu kernel: RBP: 88007fc63c28 R08:  R09: 
> 88040d803600
> Mär 29 11:53:05 fu kernel: R10:  R11: 0004 R12: 
> 
> Mär 29 11:53:05 fu kernel: R13: 880406ded080 R14: 880400607238 R15: 
> 880405e16f00
> Mär 29 11:53:05 fu kernel: FS:  7f0469f18700() 
> GS:88041e28() knlGS:
> Mär 29 11:53:05 fu kernel: CS:  0010 DS:  ES:  CR0: 80050033
> Mär 29 11:53:05 fu kernel: CR2:  CR3: d9926000 CR4: 
> 000407e0
> Mär 29 11:53:05 fu kernel: Stack:
> Mär 29 11:53:05 fu kernel:  880405c7fa00 880406ded000 
> 880406ded078 88007fc63c60
> Mär 29 11:53:05 fu kernel:  a01f90cc 880406ded348 
> 880400607238 880405e16f00
> Mär 29 11:53:05 fu kernel:  a01f9e80 880405e16f10 
> 88007fc63c98 811a843f
> Mär 29 11:53:05 fu kernel: Call Trace:
> Mär 29 11:53:05 fu kernel:  [] mousedev_open+0xcc/0x150 
> [mousedev]
> Mär 29 11:53:05 fu kernel:  [] chrdev_open+0x9f/0x1d0
> Mär 29 11:53:05 fu kernel:  [] do_dentry_open+0x1b7/0x2c0
> Mär 29 11:53:05 fu kernel:  [] ? 
> __inode_permission+0x41/0xb0
> Mär 29 11:53:05 fu kernel:  [] ? cdev_put+0x30/0x30
> Mär 29 11:53:05 fu kernel:  [] finish_open+0x31/0x40
> Mär 29 11:53:05 fu kernel:  [] do_last+0x572/0xe90
> Mär 29 11:53:05 fu kernel:  [] ? link_path_walk+0x236/0x8d0
> Mär 29 11:53:05 fu kernel:  [] ? unlock_page+0x23/0x30
> Mär 29 11:53:05 fu kernel:  [] path_openat+0xbb/0x6b0
> Mär 29 11:53:05 fu kernel:  [] ? handle_mm_fault+0x264/0xed0
> Mär 29 11:53:05 fu kernel:  [] do_filp_open+0x3a/0x90
> Mär 29 11:53:05 fu kernel:  [] ? __alloc_fd+0xa7/0x130
> Mär 29 11:53:05 fu kernel:  [] do_sys_open+0x124/0x220
> Mär 29 11:53:05 fu kernel:  [] SyS_open+0x1e/0x20
> Mär 29 11:53:05 fu kernel:  [] 
> system_call_fastpath+0x1a/0x1f
> Mär 29 11:53:05 fu kernel: Code: e0 05 32 e1 5b 44 89 e0 41 5c 41 5d 5d c3 66 
> 0f 1f 44 00 00 4c 89 ef 41 bc ed ff ff ff e8 c2 05 32 e1 eb e0 48 8b 15 c9 21 
> 00 00 <8b> 02 8d 48 01 85 c0 89 0a 75 c6 48 8b 05 37 1f 00 00 48 3d 60 
> Mär 29 11:53:05 fu kernel: RIP  [] 
> mousedev_open_device+0x77/0x100 [mousedev]
> Mär 29 11:53:05 fu kernel:  RSP 
> Mär 29 11:53:05 fu kernel: CR2: 
> Mär 29 11:53:05 fu kernel: ---[ end trace cea09d6c5d332dfc ]---
> 
> ---
> 
> I am on Archlinux, on a Thinkpad x220, if that matters. I will also
> write a message to the bugtracker as soon as my email addr gets
> verified.
> 
> Regards!
> 


-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpE4cRLboDVo.pgp
Description: PGP signature


[PATCH 55/55] scsi: Mark functions as static in bfa/bfad_bsg.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in bfa/bfad_bsg.c because they are not used
outside this file.

This eliminates the following type of warnings in bfa/bfad_bsg.c:
drivers/scsi/bfa/bfad_bsg.c:26:1: warning: no previous prototype for 
‘bfad_iocmd_ioc_enable’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/bfa/bfad_bsg.c |  224 +--
 1 file changed, 112 insertions(+), 112 deletions(-)

diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index 157f604..eff75fc 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -22,7 +22,7 @@
 
 BFA_TRC_FILE(LDRV, BSG);
 
-int
+static int
 bfad_iocmd_ioc_enable(struct bfad_s *bfad, void *cmd)
 {
struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
@@ -46,7 +46,7 @@ bfad_iocmd_ioc_enable(struct bfad_s *bfad, void *cmd)
return rc;
 }
 
-int
+static int
 bfad_iocmd_ioc_disable(struct bfad_s *bfad, void *cmd)
 {
struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
@@ -145,7 +145,7 @@ bfad_iocmd_ioc_get_attr(struct bfad_s *bfad, void *cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_ioc_get_stats(struct bfad_s *bfad, void *cmd)
 {
struct bfa_bsg_ioc_stats_s *iocmd = (struct bfa_bsg_ioc_stats_s *)cmd;
@@ -155,7 +155,7 @@ bfad_iocmd_ioc_get_stats(struct bfad_s *bfad, void *cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_ioc_get_fwstats(struct bfad_s *bfad, void *cmd,
unsigned int payload_len)
 {
@@ -185,7 +185,7 @@ out:
return 0;
 }
 
-int
+static int
 bfad_iocmd_ioc_reset_stats(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
 {
struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
@@ -203,7 +203,7 @@ bfad_iocmd_ioc_reset_stats(struct bfad_s *bfad, void *cmd, 
unsigned int v_cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_ioc_set_name(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
 {
struct bfa_bsg_ioc_name_s *iocmd = (struct bfa_bsg_ioc_name_s *) cmd;
@@ -217,7 +217,7 @@ bfad_iocmd_ioc_set_name(struct bfad_s *bfad, void *cmd, 
unsigned int v_cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_iocfc_get_attr(struct bfad_s *bfad, void *cmd)
 {
struct bfa_bsg_iocfc_attr_s *iocmd = (struct bfa_bsg_iocfc_attr_s *)cmd;
@@ -228,7 +228,7 @@ bfad_iocmd_iocfc_get_attr(struct bfad_s *bfad, void *cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_ioc_fw_sig_inv(struct bfad_s *bfad, void *cmd)
 {
struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
@@ -240,7 +240,7 @@ bfad_iocmd_ioc_fw_sig_inv(struct bfad_s *bfad, void *cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_iocfc_set_intr(struct bfad_s *bfad, void *cmd)
 {
struct bfa_bsg_iocfc_intr_s *iocmd = (struct bfa_bsg_iocfc_intr_s *)cmd;
@@ -253,7 +253,7 @@ bfad_iocmd_iocfc_set_intr(struct bfad_s *bfad, void *cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_port_enable(struct bfad_s *bfad, void *cmd)
 {
struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
@@ -274,7 +274,7 @@ bfad_iocmd_port_enable(struct bfad_s *bfad, void *cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_port_disable(struct bfad_s *bfad, void *cmd)
 {
struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
@@ -324,7 +324,7 @@ bfad_iocmd_port_get_attr(struct bfad_s *bfad, void *cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_port_get_stats(struct bfad_s *bfad, void *cmd,
unsigned int payload_len)
 {
@@ -358,7 +358,7 @@ out:
return 0;
 }
 
-int
+static int
 bfad_iocmd_port_reset_stats(struct bfad_s *bfad, void *cmd)
 {
struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
@@ -379,7 +379,7 @@ bfad_iocmd_port_reset_stats(struct bfad_s *bfad, void *cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_set_port_cfg(struct bfad_s *bfad, void *iocmd, unsigned int v_cmd)
 {
struct bfa_bsg_port_cfg_s *cmd = (struct bfa_bsg_port_cfg_s *)iocmd;
@@ -399,7 +399,7 @@ bfad_iocmd_set_port_cfg(struct bfad_s *bfad, void *iocmd, 
unsigned int v_cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_port_cfg_maxfrsize(struct bfad_s *bfad, void *cmd)
 {
struct bfa_bsg_port_cfg_maxfrsize_s *iocmd =
@@ -413,7 +413,7 @@ bfad_iocmd_port_cfg_maxfrsize(struct bfad_s *bfad, void 
*cmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_port_cfg_bbcr(struct bfad_s *bfad, unsigned int cmd, void *pcmd)
 {
struct bfa_bsg_bbcr_enable_s *iocmd =
@@ -436,7 +436,7 @@ bfad_iocmd_port_cfg_bbcr(struct bfad_s *bfad, unsigned int 
cmd, void *pcmd)
return 0;
 }
 
-int
+static int
 bfad_iocmd_port_get_bbcr_attr(struct bfad_s *bfad, void *pcmd)
 {
struct bfa_bsg_bbcr_attr_s *iocmd = (struct bfa_bsg_bbcr_attr_s *) pcmd;
@@ -474,7 +474,7 @@ out:
return 0;
 }
 
-int
+static int
 bfad_iocmd_lport_get_stats(struct bfad_s *bfad, void *cmd)
 {
struct bfa_fcs_lport_s 

[PATCH 54/55] scsi: Add prototype declaration to header file ufs/ufshcd.h

2014-03-29 Thread Rashika Kheria
Add prototype declaration of functions to header file ufs/ufshcd.h
because they are used by more than one file.

This eliminates the following warning in ufs/ufshcd.h:
drivers/scsi/ufs/ufshcd.c:2769:5: warning: no previous prototype for 
‘ufshcd_suspend’ [-Wmissing-prototypes]
drivers/scsi/ufs/ufshcd.c:2790:5: warning: no previous prototype for 
‘ufshcd_resume’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/ufs/ufshcd.h |2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index 577679a..9a920c3 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -317,4 +317,6 @@ static inline int ufshcd_dme_peer_get(struct ufs_hba *hba,
return ufshcd_dme_get_attr(hba, attr_sel, mib_val, DME_PEER);
 }
 
+int ufshcd_suspend(struct ufs_hba *hba, pm_message_t state);
+int ufshcd_resume(struct ufs_hba *hba);
 #endif /* End of Header */
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-29 Thread Conrad Meyer
On Sun, 30 Mar 2014 02:56:46 +0900
OGAWA Hirofumi  wrote:

> Conrad Meyer  writes:
> 
> Hi,
> 
> > When possible, infer DOS 2.x BIOS Parameter Block from
> > block device geometry (for floppies and floppy images).
> > Update in-memory only. We only perform this update when
> > the entire BPB region is zeroed, like produced by DOS
> > 1.x-era FORMAT (and other OEM variations on DOS).
> >
> > Fixes kernel.org bug #42617.
> >
> > BPB default values are inferred from media size and a
> > table.[0] Media size is assumed to be static for archaic
> > FAT volumes. See also [1].
> >
> > [0]:
> > https://en.wikipedia.org/wiki/File_Allocation_Table#Exceptions
> > [1]: http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html
> 
> [...]
> 
> > +static void fat_update_archaic_boot_sector(struct
> > super_block *sb,
> > +   struct fat_boot_sector *b)
> > +{
> > +   sector_t bd_sects;
> > +
> > +   if (get_unaligned_le16(>sector_size) != 0 ||
> > b->sec_per_clus != 0 ||
> > +   b->reserved != 0 || b->fats != 0 ||
> > +   get_unaligned_le16(>dir_entries) != 0
> > ||
> > +   get_unaligned_le16(>sectors) != 0 ||
> > b->media != 0 ||
> > +   b->fat_length != 0 || b->secs_track != 0
> > || b->heads != 0 ||
> > +   b->secs_track != 0 || b->heads != 0)
> > +   return;
> > +
> > +   bd_sects =
> > part_nr_sects_read(sb->s_bdev->bd_part);
> > +   switch (bd_sects) {
> > +   case 160 * KB_IN_SECTORS:
> > +   b->sec_per_clus = 1;
> > +   put_unaligned_le16(64, >dir_entries);
> > +   b->media = 0xFE;
> > +   b->fat_length = cpu_to_le16(1);
> > +   break;
> 
> [...]
> 
> Hm, this looks like check the volume size. But if there is
> newer fat format on same volume size, how to detect it? Or,
> it is conflicting?

Newer fat volumes will have some non-zero values in the BPB
-- see the early return at the top of the update function. So
this code will ignore them.

> 
> [BTW, we should avoid to mount if it doesn't seem fatfs, to
> prevent mis-mount as fatfs (auto mount is depending on this
> detection).]
> 
> Thanks.

Hmm, good point. The checks for zero values in 0x0b through
~0x19 (BPB 2 with some of the BPB 3 fields) should help
prevent conflicts, to some degree. We can also check the
3-byte field "ignored" in struct fat_boot_sector -- it is
commonly "eb xx 90" (x86: JMP [rel8] ; NOP) but can also be
"e9 xx xx xx xx" (x86: JMP [rel32]).

These old floppies were only ever created on 16-bit machines,
so I think we can conditionalize on "eb xx 90". I will fix and
resend.

The first three bytes are on all the images from 1985 I have
are: eb 1c 90.

Here's the full boot sector. Perhaps we can also
conditionalize on the "Not system boot floppy" string?
Probably not, we want to support mounting boot floppies as
well.

000: eb1c 9000        
010:        fa33  ...3
020: c08e d0bc 0006 fb0e e846 00b4 06b0 00b7  .F..
030: 07b9  ba4f 18cd 10b4 02ba  b700  .O..
040: cd10 beb8 102e 8a04 0ac0 74f9 56b4 0ebb  ..t.V...
050: 0700 cd10 5e46 ebed 074e 6f74 2073 7973  ^F...Not sys
060: 7465 6d20 626f 6f74 2066 6c6f 7070 792e  tem boot floppy.
070: 0058 5bba 8b10 8bca 2bd0 d1fa d1fa d1fa  .X[.+...
080: d1fa 2bda 5351 cb00      ..+.SQ..

The rest (0x090-0x1ff) is zeroes.

And here's the disassembly of the address signified by "JMP
+0x1c" (0x1e):

0x001e  fa  cli
0x001f  33c0xor %ax,%ax
0x0021  8ed0mov %ax,%ss
0x0023  bc0006  mov $0x600,%sp
0x0026  fb  sti
0x0027  0e  push %cs
0x0028  e84600  call func_0071

Not sure how common that is among FAT images; mkfs.fat does not
appear to generate valid code, other than eb 3c 90 at the
beginning of the sector.

Thanks,
Conrad
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 53/55] scsi: Mark functions as static in ufs/ufshcd.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in ufs/ufshcd.c because they are not used
outside this file.

This eliminates the following warnings in ufs/ufshcd.c:
drivers/scsi/ufs/ufshcd.c:1173:5: warning: no previous prototype for 
‘ufshcd_query_attr’ [-Wmissing-prototypes]
drivers/scsi/ufs/ufshcd.c:1484:5: warning: no previous prototype for 
‘ufshcd_uic_change_pwr_mode’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/ufs/ufshcd.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 04884d6..894bab6 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -1170,7 +1170,7 @@ out_unlock:
  *
  * Returns 0 for success, non-zero in case of failure
 */
-int ufshcd_query_attr(struct ufs_hba *hba, enum query_opcode opcode,
+static int ufshcd_query_attr(struct ufs_hba *hba, enum query_opcode opcode,
enum attr_idn idn, u8 index, u8 selector, u32 *attr_val)
 {
struct ufs_query_req *request;
@@ -1481,7 +1481,7 @@ EXPORT_SYMBOL_GPL(ufshcd_dme_get_attr);
  *
  * Returns 0 on success, non-zero value on failure
  */
-int ufshcd_uic_change_pwr_mode(struct ufs_hba *hba, u8 mode)
+static int ufshcd_uic_change_pwr_mode(struct ufs_hba *hba, u8 mode)
 {
struct uic_command uic_cmd = {0};
struct completion pwr_done;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 52/55] scsi: Move prototype declaration to header file megaraid/megaraid_sas.h from megaraid/megaraid_sas_fusion.c

2014-03-29 Thread Rashika Kheria
Move prototype declaration of function to header file
megaraid/megaraid_sas.h from megaraid/megaraid_sas_fusion.c because it
is used by more than one file.

This eliminates the following warning in megaraid/megaraid_sas_fp.c:
drivers/scsi/megaraid/megaraid_sas_fp.c:1223:5: warning: no previous prototype 
for ‘get_updated_dev_handle’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/megaraid/megaraid_sas.h|3 +++
 drivers/scsi/megaraid/megaraid_sas_fusion.c |2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.h 
b/drivers/scsi/megaraid/megaraid_sas.h
index 3b0afb4..17fe706 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -1737,6 +1737,9 @@ megasas_check_and_restore_queue_depth(struct 
megasas_instance *instance);
 void megasas_free_cmds(struct megasas_instance *instance);
 int megasas_alloc_cmds(struct megasas_instance *instance);
 
+u16 get_updated_dev_handle(struct LD_LOAD_BALANCE_INFO *lbInfo,
+  struct IO_REQUEST_INFO *in_info);
+
 u8
 MR_BuildRaidContext(struct megasas_instance *instance,
struct IO_REQUEST_INFO *io_info,
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c 
b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index ce6219c..b3d79f4 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -63,8 +63,6 @@ wait_and_poll(struct megasas_instance *instance, struct 
megasas_cmd *cmd);
 int
 megasas_clear_intr_fusion(struct megasas_register_set __iomem *regs);
 
-u16 get_updated_dev_handle(struct LD_LOAD_BALANCE_INFO *lbInfo,
-  struct IO_REQUEST_INFO *in_info);
 int megasas_transition_to_ready(struct megasas_instance *instance, int ocr);
 
 extern u32 megasas_dbg_lvl;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 51/55] scsi: Move prototype declaration to header file megaraid/megaraid_sas_fusion.h from megaraid/megaraid_sas_base.c

2014-03-29 Thread Rashika Kheria
Move prototype declarations of functions to header file
megaraid/megaraid_sas_fusion.h from megaraid/megaraid_sas_base.c because
they are used by more than one file.

This eliminates the following type of warnings in
megaraid/megaraid_sas_fusion.c:
drivers/scsi/megaraid/megaraid_sas_fusion.c:2170:1: warning: no previous 
prototype for ‘megasas_release_fusion’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/megaraid/megaraid_sas_base.c   |   13 -
 drivers/scsi/megaraid/megaraid_sas_fusion.h |   14 ++
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c 
b/drivers/scsi/megaraid/megaraid_sas_base.c
index 9768deee..0ad386b 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -160,21 +160,8 @@ u32
 megasas_build_and_issue_cmd(struct megasas_instance *instance,
struct scsi_cmnd *scmd);
 static void megasas_complete_cmd_dpc(unsigned long instance_addr);
-void
-megasas_release_fusion(struct megasas_instance *instance);
-int
-megasas_ioc_init_fusion(struct megasas_instance *instance);
-void
-megasas_free_cmds_fusion(struct megasas_instance *instance);
-u8
-megasas_get_map_info(struct megasas_instance *instance);
-int
-megasas_sync_map_info(struct megasas_instance *instance);
 int
 wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd);
-void megasas_reset_reply_desc(struct megasas_instance *instance);
-int megasas_reset_fusion(struct Scsi_Host *shost);
-void megasas_fusion_ocr_wq(struct work_struct *work);
 
 static void
 megasas_issue_dcmd(struct megasas_instance *instance, struct megasas_cmd *cmd)
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.h 
b/drivers/scsi/megaraid/megaraid_sas_fusion.h
index 35a5139..01e5ab3 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.h
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.h
@@ -760,4 +760,18 @@ union desc_value {
} u;
 };
 
+void
+megasas_release_fusion(struct megasas_instance *instance);
+int
+megasas_ioc_init_fusion(struct megasas_instance *instance);
+void
+megasas_free_cmds_fusion(struct megasas_instance *instance);
+u8
+megasas_get_map_info(struct megasas_instance *instance);
+int
+megasas_sync_map_info(struct megasas_instance *instance);
+void megasas_reset_reply_desc(struct megasas_instance *instance);
+int megasas_reset_fusion(struct Scsi_Host *shost);
+void megasas_fusion_ocr_wq(struct work_struct *work);
+
 #endif /* _MEGARAID_SAS_FUSION_H_ */
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 50/55] scsi: Mark function and macro definition as static in be2iscsi/be_main.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in be2iscsi/be_main.c because they are not used
outside this file. Also, add static keyword to the macro definition to
ensure prototype of functions as defined.

This eliminates the following warning in be2iscsi/be_main.c:
drivers/scsi/be2iscsi/be_main.c:153:1: warning: no previous prototype for 
‘beiscsi_log_enable_disp’ [-Wmissing-prototypes]
drivers/scsi/be2iscsi/be_main.c:153:1: warning: no previous prototype for 
‘beiscsi_log_enable_change’ [-Wmissing-prototypes]
drivers/scsi/be2iscsi/be_main.c:153:1: warning: no previous prototype for 
‘beiscsi_log_enable_store’ [-Wmissing-prototypes]
drivers/scsi/be2iscsi/be_main.c:153:1: warning: no previous prototype for 
‘beiscsi_log_enable_init’ [-Wmissing-prototypes]
drivers/scsi/be2iscsi/be_main.c:4843:5: warning: no previous prototype for 
‘beiscsi_iotask_v2’ [-Wmissing-prototypes]
drivers/scsi/be2iscsi/be_main.c:5181:6: warning: no previous prototype for 
‘beiscsi_hba_attrs_init’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/be2iscsi/be_main.c |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 1f37505..d9d0087 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -61,7 +61,7 @@ MODULE_PARM_DESC(be_max_phys_size,
"memory that can be allocated. Range is 16 - 128");
 
 #define beiscsi_disp_param(_name)\
-ssize_t\
+static ssize_t \
 beiscsi_##_name##_disp(struct device *dev,\
struct device_attribute *attrib, char *buf) \
 {  \
@@ -74,7 +74,7 @@ beiscsi_##_name##_disp(struct device *dev,\
 }
 
 #define beiscsi_change_param(_name, _minval, _maxval, _defaval)\
-int \
+static int \
 beiscsi_##_name##_change(struct beiscsi_hba *phba, uint32_t val)\
 {\
if (val >= _minval && val <= _maxval) {\
@@ -93,7 +93,7 @@ beiscsi_##_name##_change(struct beiscsi_hba *phba, uint32_t 
val)\
 }
 
 #define beiscsi_store_param(_name)  \
-ssize_t \
+static ssize_t \
 beiscsi_##_name##_store(struct device *dev,\
 struct device_attribute *attr, const char *buf,\
 size_t count) \
@@ -112,7 +112,7 @@ beiscsi_##_name##_store(struct device *dev,\
 }
 
 #define beiscsi_init_param(_name, _minval, _maxval, _defval) \
-int \
+static int \
 beiscsi_##_name##_init(struct beiscsi_hba *phba, uint32_t val) \
 { \
if (val >= _minval && val <= _maxval) {\
@@ -4840,9 +4840,9 @@ free_hndls:
io_task->cmd_bhs = NULL;
return -ENOMEM;
 }
-int beiscsi_iotask_v2(struct iscsi_task *task, struct scatterlist *sg,
-  unsigned int num_sg, unsigned int xferlen,
-  unsigned int writedir)
+static int beiscsi_iotask_v2(struct iscsi_task *task, struct scatterlist *sg,
+unsigned int num_sg, unsigned int xferlen,
+unsigned int writedir)
 {
 
struct beiscsi_io_task *io_task = task->dd_data;
@@ -5178,7 +5178,7 @@ static int beiscsi_bsg_request(struct bsg_job *job)
return rc;
 }
 
-void beiscsi_hba_attrs_init(struct beiscsi_hba *phba)
+static void beiscsi_hba_attrs_init(struct beiscsi_hba *phba)
 {
/* Set the logging parameter */
beiscsi_log_enable_init(phba, beiscsi_log_enable);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 49/55] scsi: Move prototype declaration to header file scsi_priv.h from scsi_scan.c

2014-03-29 Thread Rashika Kheria
Move prototype declarations of functions to header file scsi_priv.h from
scsi_scan.c because they are used by more than one file.

This eliminates the following warnings in scsi_lib.c:
drivers/scsi/scsi_lib.c:466:6: warning: no previous prototype for 
‘scsi_requeue_run_queue’ [-Wmissing-prototypes]
drivers/scsi/scsi_lib.c:2266:6: warning: no previous prototype for 
‘scsi_evt_thread’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/scsi_priv.h |2 ++
 drivers/scsi/scsi_scan.c |2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index f079a59..3fd3b6f 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -84,6 +84,8 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd);
 extern int scsi_maybe_unblock_host(struct scsi_device *sdev);
 extern void scsi_device_unbusy(struct scsi_device *sdev);
 extern void scsi_queue_insert(struct scsi_cmnd *cmd, int reason);
+void scsi_requeue_run_queue(struct work_struct *work);
+void scsi_evt_thread(struct work_struct *work);
 extern void scsi_next_command(struct scsi_cmnd *cmd);
 extern void scsi_io_completion(struct scsi_cmnd *, unsigned int);
 extern void scsi_run_host_queues(struct Scsi_Host *shost);
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 307a811..3a67307 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -229,8 +229,6 @@ static struct scsi_device *scsi_alloc_sdev(struct 
scsi_target *starget,
struct scsi_device *sdev;
int display_failure_msg = 1, ret;
struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
-   extern void scsi_evt_thread(struct work_struct *work);
-   extern void scsi_requeue_run_queue(struct work_struct *work);
 
sdev = kzalloc(sizeof(*sdev) + shost->transportt->device_size,
   GFP_ATOMIC);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PULL] timer fix

2014-03-29 Thread Ingo Molnar
Linus,

Please pull the latest timers-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 
timers-urgent-for-linus

   # HEAD: cab5e127eef040399902caa8e1510795583fa03a time: Revert to calling 
clock_was_set_delayed() while in irq context

A late breaking fix from John. (The bug fixed has a hard lockup 
potential, but that was not observed, warnings were.)

 Thanks,

Ingo

-->
John Stultz (1):
  time: Revert to calling clock_was_set_delayed() while in irq context


 kernel/time/timekeeping.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 0aa4ce8..5b40279 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1435,7 +1435,8 @@ void update_wall_time(void)
 out:
raw_spin_unlock_irqrestore(_lock, flags);
if (clock_set)
-   clock_was_set();
+   /* Have to call _delayed version, since in irq context*/
+   clock_was_set_delayed();
 }
 
 /**
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 48/55] scsi: Mark function as static in scsi_debug.c

2014-03-29 Thread Rashika Kheria
Mark function as static in scsi_debug.c because it is not used outside
this file.

This eliminates the following warning in scsi_debug.c:
drivers/scsi/scsi_debug.c:1910:6: warning: no previous prototype for 
‘dump_sector’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/scsi_debug.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 2decc64..356b548 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -1907,7 +1907,7 @@ static int resp_read(struct scsi_cmnd *SCpnt, unsigned 
long long lba,
return 0;
 }
 
-void dump_sector(unsigned char *buf, int len)
+static void dump_sector(unsigned char *buf, int len)
 {
int i, j;
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 47/55] scsi: Mark functions as static in scsi/pmcraid.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in pmcraid.c because they are not used outside
this file.

This eliminates the following warnings in pmcraid.c:
drivers/scsi/pmcraid.c:349:6: warning: no previous prototype for 
‘pmcraid_init_cmdblk’ [-Wmissing-prototypes]
drivers/scsi/pmcraid.c:444:6: warning: no previous prototype for 
‘pmcraid_return_cmd’ [-Wmissing-prototypes]
drivers/scsi/pmcraid.c:1759:6: warning: no previous prototype for 
‘pmcraid_ioasc_logger’ [-Wmissing-prototypes]
drivers/scsi/pmcraid.c:3217:1: warning: no previous prototype for 
‘pmcraid_init_ioadls’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/pmcraid.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index be8ce54..3570982 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -346,7 +346,7 @@ static int pmcraid_change_queue_type(struct scsi_device 
*scsi_dev, int tag)
  * Return Value
  *  None
  */
-void pmcraid_init_cmdblk(struct pmcraid_cmd *cmd, int index)
+static void pmcraid_init_cmdblk(struct pmcraid_cmd *cmd, int index)
 {
struct pmcraid_ioarcb *ioarcb = &(cmd->ioa_cb->ioarcb);
dma_addr_t dma_addr = cmd->ioa_cb_bus_addr;
@@ -441,7 +441,7 @@ static struct pmcraid_cmd *pmcraid_get_free_cmd(
  * Return Value:
  * nothing
  */
-void pmcraid_return_cmd(struct pmcraid_cmd *cmd)
+static void pmcraid_return_cmd(struct pmcraid_cmd *cmd)
 {
struct pmcraid_instance *pinstance = cmd->drv_inst;
unsigned long lock_flags;
@@ -1756,7 +1756,7 @@ static struct pmcraid_ioasc_error 
*pmcraid_get_error_info(u32 ioasc)
  * @ioasc: ioasc code
  * @cmd: pointer to command that resulted in 'ioasc'
  */
-void pmcraid_ioasc_logger(u32 ioasc, struct pmcraid_cmd *cmd)
+static void pmcraid_ioasc_logger(u32 ioasc, struct pmcraid_cmd *cmd)
 {
struct pmcraid_ioasc_error *error_info = pmcraid_get_error_info(ioasc);
 
@@ -3213,7 +3213,7 @@ static u8 pmcraid_task_attributes(struct scsi_cmnd 
*scsi_cmd)
  *   returns pointer pmcraid_ioadl_desc, initialized to point to internal
  *   or external IOADLs
  */
-struct pmcraid_ioadl_desc *
+static struct pmcraid_ioadl_desc *
 pmcraid_init_ioadls(struct pmcraid_cmd *cmd, int sgcount)
 {
struct pmcraid_ioadl_desc *ioadl;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 46/55] scsi: Mark functions as static in gdth.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in gdth.c because they are not used outside
this file.

This eliminates the following warnings in gdth.c:
drivers/scsi/gdth.c:445:5: warning: no previous prototype for ‘__gdth_execute’ 
[-Wmissing-prototypes]
drivers/scsi/gdth.c:3830:12: warning: no previous prototype for ‘option_setup’ 
[-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/gdth.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index ce5ef01..8015f1b 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -442,8 +442,8 @@ static void gdth_scsi_done(struct scsi_cmnd *scp)
scp->scsi_done(scp);
 }
 
-int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd,
-   int timeout, u32 *info)
+static int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd,
+ char *cmnd, int timeout, u32 *info)
 {
 gdth_ha_str *ha = shost_priv(sdev->host);
 Scsi_Cmnd *scp;
@@ -3827,7 +3827,7 @@ static void __init internal_setup(char *str,int *ints)
 }
 }
 
-int __init option_setup(char *str)
+static int __init option_setup(char *str)
 {
 int ints[MAXHA];
 char *cur = str;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 45/55] scsi: Mark funtion as static in hpsa.c

2014-03-29 Thread Rashika Kheria
Mark function as static in hpsa.c because it is not used outside this
file.

This eliminates the following warning in hpsa.c:
drivers/scsi/hpsa.c:1925:5: warning: no previous prototype for 
‘figure_lunaddrbytes’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/hpsa.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 868318a..025dc8e 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1922,8 +1922,9 @@ static int hpsa_gather_lun_info(struct ctlr_info *h,
return 0;
 }
 
-u8 *figure_lunaddrbytes(struct ctlr_info *h, int raid_ctlr_position, int i,
-   int nphysicals, int nlogicals, struct ReportLUNdata *physdev_list,
+static u8 *figure_lunaddrbytes(struct ctlr_info *h, int raid_ctlr_position,
+   int i, int nphysicals, int nlogicals,
+   struct ReportLUNdata *physdev_list,
struct ReportLUNdata *logdev_list)
 {
/* Helper function, figure out where the LUN ID info is coming from
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 44/55] scsi: Mark function as static in scsi/libiscsi.c

2014-03-29 Thread Rashika Kheria
Mark function as static in libiscsi.c because it is not used outside
this file. Also, unexport the function because it is used only in this
file.

This eliminates the following warning in libiscsi.c:
drivers/scsi/libiscsi.c:2386:5: warning: no previous prototype for 
‘iscsi_eh_target_reset’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/libiscsi.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 4046241..3afc7b6 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -2383,7 +2383,7 @@ static void iscsi_prep_tgt_reset_pdu(struct scsi_cmnd 
*sc, struct iscsi_tm *hdr)
  *
  * This will attempt to send a warm target reset.
  */
-int iscsi_eh_target_reset(struct scsi_cmnd *sc)
+static int iscsi_eh_target_reset(struct scsi_cmnd *sc)
 {
struct iscsi_cls_session *cls_session;
struct iscsi_session *session;
@@ -2455,7 +2455,6 @@ done:
mutex_unlock(>eh_mutex);
return rc;
 }
-EXPORT_SYMBOL_GPL(iscsi_eh_target_reset);
 
 /**
  * iscsi_eh_recover_target - reset target and possibly the session
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 43/55] scsi: Mark function as static in scsi_transport_iscsi.c

2014-03-29 Thread Rashika Kheria
Mark function as static in scsi_transport_iscsi.c because it is not used
outside this file. Also, unexport the function since it's only used in
this file.

This eliminates the following warning in scsi_transport_iscsi.c:
drivers/scsi/scsi_transport_iscsi.c:1325:5: warning: no previous prototype for 
‘iscsi_is_flashnode_conn_dev’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/scsi_transport_iscsi.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_transport_iscsi.c 
b/drivers/scsi/scsi_transport_iscsi.c
index fd8ffe6..5b6185e 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -1322,11 +1322,10 @@ EXPORT_SYMBOL_GPL(iscsi_create_flashnode_conn);
  *  1 on success
  *  0 on failure
  */
-int iscsi_is_flashnode_conn_dev(struct device *dev, void *data)
+static int iscsi_is_flashnode_conn_dev(struct device *dev, void *data)
 {
return dev->bus == _flashnode_bus;
 }
-EXPORT_SYMBOL_GPL(iscsi_is_flashnode_conn_dev);
 
 static int iscsi_destroy_flashnode_conn(struct iscsi_bus_flash_conn 
*fnode_conn)
 {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 42/55] scsi: Mark function as static in scsi_transport_fc.c

2014-03-29 Thread Rashika Kheria
Mark function as static in scsi_transport_fc.c because it is not used
outside this file.

This eliminates the following warning in scsi_transport_fc.c:
drivers/scsi/scsi_transport_fc.c:2025:5: warning: no previous prototype for 
‘scsi_is_fc_vport’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/scsi_transport_fc.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 4628fd5..7c01007 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -2022,11 +2022,10 @@ static void fc_vport_dev_release(struct device *dev)
kfree(vport);
 }
 
-int scsi_is_fc_vport(const struct device *dev)
+static int scsi_is_fc_vport(const struct device *dev)
 {
return dev->release == fc_vport_dev_release;
 }
-EXPORT_SYMBOL(scsi_is_fc_vport);
 
 static int fc_vport_match(struct attribute_container *cont,
struct device *dev)
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 41/55] scsi: Mark functions as static in qla2xxx/qla_nx2.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in qla2xxx/qla_nx2.c because they are not used
outside this file.

This eliminates the following warning in qla2xxx/qla_nx2.c:
drivers/scsi/qla2xxx/qla_nx2.c:473:1: warning: no previous prototype for 
‘qla8044_need_reset’ [-Wmissing-prototypes]
drivers/scsi/qla2xxx/qla_nx2.c:1517:1: warning: no previous prototype for 
‘qla8044_set_rst_ready’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/qla2xxx/qla_nx2.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_nx2.c b/drivers/scsi/qla2xxx/qla_nx2.c
index f60989d..02584e7 100644
--- a/drivers/scsi/qla2xxx/qla_nx2.c
+++ b/drivers/scsi/qla2xxx/qla_nx2.c
@@ -469,7 +469,7 @@ qla8044_read_optrom_data(struct scsi_qla_host *vha, uint8_t 
*buf,
return buf;
 }
 
-inline int
+static inline int
 qla8044_need_reset(struct scsi_qla_host *vha)
 {
uint32_t drv_state, drv_active;
@@ -1513,7 +1513,7 @@ qla8044_set_idc_dontreset(struct scsi_qla_host *vha)
qla8044_wr_reg(ha, QLA8044_IDC_DRV_CTRL, idc_ctrl);
 }
 
-inline void
+static inline void
 qla8044_set_rst_ready(struct scsi_qla_host *vha)
 {
uint32_t drv_state;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 40/55] scsi: Mark function as static in qla2xxx/qla_nx.c

2014-03-29 Thread Rashika Kheria
Mark function as static in qla2xxx/qla_nx.c because it is not used
outside this file.

This eliminates the following warning in qla2xxx/qla_nx.c:
drivers/scsi/qla2xxx/qla_nx.c:2292:1: warning: no previous prototype for 
‘qla82xx_set_idc_version’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/qla2xxx/qla_nx.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index 1e6ba4a..cf49b39 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -2288,7 +2288,7 @@ void qla82xx_init_flags(struct qla_hw_data *ha)
ha->nx_legacy_intr.pci_int_reg = nx_legacy_intr->pci_int_reg;
 }
 
-inline void
+static inline void
 qla82xx_set_idc_version(scsi_qla_host_t *vha)
 {
int idc_ver;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[GIT PULL] Ceph fix for 3.14

2014-03-29 Thread Sage Weil
Hi Linus,

Please full a Ceph RBD fix from

  git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git for-linus

This drops a bad assert that a few users have been hitting but we've only 
recently been able to track down.

Thanks!
sage




Alex Elder (1):
  rbd: drop an unsafe assertion

 drivers/block/rbd.c |1 -
 1 file changed, 1 deletion(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 39/55] scsi: Mark functions as static in qla2xxx/qla_iocb.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in qla2xxx/qla_iocb.c because they are not used
outside this file.

This eliminates the following warning in qla2xxx/qla_iocb.c:
drivers/scsi/qla2xxx/qla_iocb.c:714:1: warning: no previous prototype for 
‘qla24xx_calc_dsd_lists’ [-Wmissing-prototypes]
drivers/scsi/qla2xxx/qla_iocb.c:734:1: warning: no previous prototype for 
‘qla24xx_build_scsi_iocbs’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/qla2xxx/qla_iocb.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
index 46b9307..2629477 100644
--- a/drivers/scsi/qla2xxx/qla_iocb.c
+++ b/drivers/scsi/qla2xxx/qla_iocb.c
@@ -710,7 +710,7 @@ qla24xx_build_scsi_type_6_iocbs(srb_t *sp, struct 
cmd_type_6 *cmd_pkt,
  *
  * Returns the number of dsd list needed to store @dsds.
  */
-inline uint16_t
+static inline uint16_t
 qla24xx_calc_dsd_lists(uint16_t dsds)
 {
uint16_t dsd_lists = 0;
@@ -730,7 +730,7 @@ qla24xx_calc_dsd_lists(uint16_t dsds)
  * @cmd_pkt: Command type 3 IOCB
  * @tot_dsds: Total number of segments to transfer
  */
-inline void
+static inline void
 qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt,
 uint16_t tot_dsds)
 {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 38/55] scsi: Mark function as static in qla2xxx/qla_bsg.c

2014-03-29 Thread Rashika Kheria
Mark function as static in qla2xxx/qla_bsg.c because it is not used
outside this file.

This eliminates the following warning in qla2xxx/qla_bsg.c:
drivers/scsi/qla2xxx/qla_bsg.c:409:1: warning: no previous prototype for 
‘qla24xx_calc_ct_iocbs’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/qla2xxx/qla_bsg.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index f15d03e..16b7e58 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -405,7 +405,7 @@ done:
return rval;
 }
 
-inline uint16_t
+static inline uint16_t
 qla24xx_calc_ct_iocbs(uint16_t dsds)
 {
uint16_t iocbs;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 37/55] scsi: Mark function as static in pm8001/pm80xx_hwi.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in pm8001/pm80xx_hwi.c because they are not
used outside this file.

This eliminates the following warning in pm8001/pm80xx_hwi.c:
drivers/scsi/pm8001/pm80xx_hwi.c:69:6: warning: no previous prototype for 
‘pm80xx_pci_mem_copy’ [-Wmissing-prototypes]
drivers/scsi/pm8001/pm80xx_hwi.c:4529:6: warning: no previous prototype for 
‘mpi_set_phy_profile_req’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/pm8001/pm80xx_hwi.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index c950dc5..156947e 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -66,7 +66,7 @@ int pm80xx_bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 
shift_value)
return 0;
 }
 
-void pm80xx_pci_mem_copy(struct pm8001_hba_info  *pm8001_ha, u32 soffset,
+static void pm80xx_pci_mem_copy(struct pm8001_hba_info  *pm8001_ha, u32 
soffset,
const void *destination,
u32 dw_count, u32 bus_base_number)
 {
@@ -4526,8 +4526,8 @@ pm80xx_chip_isr(struct pm8001_hba_info *pm8001_ha, u8 vec)
return IRQ_HANDLED;
 }
 
-void mpi_set_phy_profile_req(struct pm8001_hba_info *pm8001_ha,
-   u32 operation, u32 phyid, u32 length, u32 *buf)
+static void mpi_set_phy_profile_req(struct pm8001_hba_info *pm8001_ha,
+   u32 operation, u32 phyid, u32 length, u32 *buf)
 {
u32 tag , i, j = 0;
int rc;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 36/55] scsi: Mark function as static in pm8001/pm8001_hwi.c

2014-03-29 Thread Rashika Kheria
Mark function as static in pm8001/pm8001_hwi.c because it is not used
outside this file.

This eliminates the following warning in pm8001/pm8001_hwi.c:
drivers/scsi/pm8001/pm8001_hwi.c:4537:5: warning: no previous prototype for 
‘pm8001_chip_phy_stop_req’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/pm8001/pm8001_hwi.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 0a1296a..2f8aab1 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -4534,7 +4534,7 @@ pm8001_chip_phy_start_req(struct pm8001_hba_info 
*pm8001_ha, u8 phy_id)
  * @num: the inbound queue number
  * @phy_id: the phy id which we wanted to start up.
  */
-int pm8001_chip_phy_stop_req(struct pm8001_hba_info *pm8001_ha,
+static int pm8001_chip_phy_stop_req(struct pm8001_hba_info *pm8001_ha,
u8 phy_id)
 {
struct phy_stop_req payload;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 35/55] scsi: Mark function as static in pm8001/pm8001_sas.c

2014-03-29 Thread Rashika Kheria
Mark function as static in pm8001/pm8001_sas.c because it is not used
outside this file.

This eliminates the following warning in pm8001/pm8001_sas.c:
drivers/scsi/pm8001/pm8001_sas.c:551:23: warning: no previous prototype for 
‘pm8001_alloc_dev’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/pm8001/pm8001_sas.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
index f50ac44..8a82a74 100644
--- a/drivers/scsi/pm8001/pm8001_sas.c
+++ b/drivers/scsi/pm8001/pm8001_sas.c
@@ -548,7 +548,8 @@ void pm8001_ccb_task_free(struct pm8001_hba_info *pm8001_ha,
   * pm8001_alloc_dev - find a empty pm8001_device
   * @pm8001_ha: our hba card information
   */
-struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info *pm8001_ha)
+static struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info
+ *pm8001_ha)
 {
u32 dev;
for (dev = 0; dev < PM8001_MAX_DEVICES; dev++) {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 34/55] scsi: Mark function as static in pm8001/pm8001_init.c

2014-03-29 Thread Rashika Kheria
Mark function as static in pm8001/pm8001_init.c because it is not used
outside this file.

This eliminates the following warning in pm8001/pm8001_init.c:
drivers/scsi/pm8001/pm8001_init.c:677:6: warning: no previous prototype for 
‘pm8001_get_phy_settings_info’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/pm8001/pm8001_init.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/pm8001/pm8001_init.c 
b/drivers/scsi/pm8001/pm8001_init.c
index 73a120d..a82528c 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -674,7 +674,7 @@ static void pm8001_init_sas_add(struct pm8001_hba_info 
*pm8001_ha)
  * pm8001_get_phy_settings_info : Read phy setting values.
  * @pm8001_ha : our hba.
  */
-void pm8001_get_phy_settings_info(struct pm8001_hba_info *pm8001_ha)
+static void pm8001_get_phy_settings_info(struct pm8001_hba_info *pm8001_ha)
 {
 
 #ifdef PM8001_READ_VPD
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 33/55] scsi: Mark functions as static in mvsas/mv_94xx.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in mvsas/mv_94xx.c because they are not used
outside this file.

This eliminates the following warning in mvsas/mv_94xx.c:
drivers/scsi/mvsas/mv_94xx.c:51:6: warning: no previous prototype for 
‘set_phy_tuning’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_94xx.c:113:6: warning: no previous prototype for 
‘set_phy_ffe_tuning’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_94xx.c:180:6: warning: no previous prototype for 
‘set_phy_rate’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_94xx.c:635:6: warning: no previous prototype for 
‘mvs_94xx_clear_srs_irq’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_94xx.c:862:6: warning: no previous prototype for 
‘mvs_94xx_phy_set_link_rate’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_94xx.c:892:5: warning: no previous prototype for 
‘mvs_94xx_spi_read_data’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_94xx.c:898:6: warning: no previous prototype for 
‘mvs_94xx_spi_write_data’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_94xx.c:905:5: warning: no previous prototype for 
‘mvs_94xx_spi_buildcmd’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_94xx.c:930:5: warning: no previous prototype for 
‘mvs_94xx_spi_issuecmd’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_94xx.c:938:5: warning: no previous prototype for 
‘mvs_94xx_spi_waitdataready’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_94xx.c:953:6: warning: no previous prototype for 
‘mvs_94xx_fix_dma’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/mvsas/mv_94xx.c |   31 ---
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c
index 1e4479f..7ab9818 100644
--- a/drivers/scsi/mvsas/mv_94xx.c
+++ b/drivers/scsi/mvsas/mv_94xx.c
@@ -48,8 +48,8 @@ static void mvs_94xx_detect_porttype(struct mvs_info *mvi, 
int i)
}
 }
 
-void set_phy_tuning(struct mvs_info *mvi, int phy_id,
-   struct phy_tuning phy_tuning)
+static void set_phy_tuning(struct mvs_info *mvi, int phy_id,
+  struct phy_tuning phy_tuning)
 {
u32 tmp, setting_0 = 0, setting_1 = 0;
u8 i;
@@ -110,8 +110,8 @@ void set_phy_tuning(struct mvs_info *mvi, int phy_id,
}
 }
 
-void set_phy_ffe_tuning(struct mvs_info *mvi, int phy_id,
-   struct ffe_control ffe)
+static void set_phy_ffe_tuning(struct mvs_info *mvi, int phy_id,
+  struct ffe_control ffe)
 {
u32 tmp;
 
@@ -177,7 +177,7 @@ void set_phy_ffe_tuning(struct mvs_info *mvi, int phy_id,
 }
 
 /*Notice: this function must be called when phy is disabled*/
-void set_phy_rate(struct mvs_info *mvi, int phy_id, u8 rate)
+static void set_phy_rate(struct mvs_info *mvi, int phy_id, u8 rate)
 {
union reg_phy_cfg phy_cfg, phy_cfg_tmp;
mvs_write_port_vsr_addr(mvi, phy_id, VSR_PHY_MODE2);
@@ -632,7 +632,8 @@ static void mvs_94xx_command_active(struct mvs_info *mvi, 
u32 slot_idx)
}
 }
 
-void mvs_94xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set, u8 clear_all)
+static void mvs_94xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set,
+  u8 clear_all)
 {
void __iomem *regs = mvi->regs;
u32 tmp;
@@ -859,8 +860,8 @@ static void mvs_94xx_fix_phy_info(struct mvs_info *mvi, int 
i,
 
 }
 
-void mvs_94xx_phy_set_link_rate(struct mvs_info *mvi, u32 phy_id,
-   struct sas_phy_linkrates *rates)
+static void mvs_94xx_phy_set_link_rate(struct mvs_info *mvi, u32 phy_id,
+  struct sas_phy_linkrates *rates)
 {
u32 lrmax = 0;
u32 tmp;
@@ -889,20 +890,20 @@ static void mvs_94xx_clear_active_cmds(struct mvs_info 
*mvi)
 }
 
 
-u32 mvs_94xx_spi_read_data(struct mvs_info *mvi)
+static u32 mvs_94xx_spi_read_data(struct mvs_info *mvi)
 {
void __iomem *regs = mvi->regs_ex - 0x10200;
return mr32(SPI_RD_DATA_REG_94XX);
 }
 
-void mvs_94xx_spi_write_data(struct mvs_info *mvi, u32 data)
+static void mvs_94xx_spi_write_data(struct mvs_info *mvi, u32 data)
 {
void __iomem *regs = mvi->regs_ex - 0x10200;
 mw32(SPI_RD_DATA_REG_94XX, data);
 }
 
 
-int mvs_94xx_spi_buildcmd(struct mvs_info *mvi,
+static int mvs_94xx_spi_buildcmd(struct mvs_info *mvi,
u32  *dwCmd,
u8   cmd,
u8   read,
@@ -927,7 +928,7 @@ int mvs_94xx_spi_buildcmd(struct mvs_info *mvi,
 }
 
 
-int mvs_94xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd)
+static int mvs_94xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd)
 {
void __iomem *regs = mvi->regs_ex - 0x10200;
mw32(SPI_CTRL_REG_94XX, cmd | SPI_CTRL_SpiStart_94XX);
@@ -935,7 +936,7 @@ int mvs_94xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd)
return 0;
 }
 
-int mvs_94xx_spi_waitdataready(struct mvs_info *mvi, u32 timeout)
+static int 

[PATCH 32/55] scsi: Mark functions as static in mvsas/mv_64xx.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in mvsas/mv_64xx.c because they are not used
outside this file.

This eliminates the following warnings in mvsas/mv_64xx.c:
drivers/scsi/mvsas/mv_64xx.c:139:6: warning: no previous prototype for 
‘mvs_64xx_clear_srs_irq’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_64xx.c:566:6: warning: no previous prototype for 
‘mvs_64xx_make_prd’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_64xx.c:636:6: warning: no previous prototype for 
‘mvs_64xx_phy_set_link_rate’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_64xx.c:671:5: warning: no previous prototype for 
‘mvs_64xx_spi_read_data’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_64xx.c:677:6: warning: no previous prototype for 
‘mvs_64xx_spi_write_data’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_64xx.c:684:5: warning: no previous prototype for 
‘mvs_64xx_spi_buildcmd’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_64xx.c:708:5: warning: no previous prototype for 
‘mvs_64xx_spi_issuecmd’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_64xx.c:723:5: warning: no previous prototype for 
‘mvs_64xx_spi_waitdataready’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_64xx.c:738:6: warning: no previous prototype for 
‘mvs_64xx_fix_dma’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/mvsas/mv_64xx.c |   35 ++-
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_64xx.c b/drivers/scsi/mvsas/mv_64xx.c
index 8bb0699..2420386 100644
--- a/drivers/scsi/mvsas/mv_64xx.c
+++ b/drivers/scsi/mvsas/mv_64xx.c
@@ -136,7 +136,8 @@ static void mvs_64xx_phy_reset(struct mvs_info *mvi, u32 
phy_id, int hard)
}
 }
 
-void mvs_64xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set, u8 clear_all)
+static void mvs_64xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set,
+  u8 clear_all)
 {
void __iomem *regs = mvi->regs;
u32 tmp;
@@ -563,7 +564,7 @@ static u8 mvs_64xx_assign_reg_set(struct mvs_info *mvi, u8 
*tfs)
return MVS_ID_NOT_MAPPED;
 }
 
-void mvs_64xx_make_prd(struct scatterlist *scatter, int nr, void *prd)
+static void mvs_64xx_make_prd(struct scatterlist *scatter, int nr, void *prd)
 {
int i;
struct scatterlist *sg;
@@ -633,8 +634,8 @@ static void mvs_64xx_phy_work_around(struct mvs_info *mvi, 
int i)
mvs_write_port_vsr_data(mvi, i, tmp);
 }
 
-void mvs_64xx_phy_set_link_rate(struct mvs_info *mvi, u32 phy_id,
-   struct sas_phy_linkrates *rates)
+static void mvs_64xx_phy_set_link_rate(struct mvs_info *mvi, u32 phy_id,
+   struct sas_phy_linkrates *rates)
 {
u32 lrmin = 0, lrmax = 0;
u32 tmp;
@@ -668,26 +669,26 @@ static void mvs_64xx_clear_active_cmds(struct mvs_info 
*mvi)
 }
 
 
-u32 mvs_64xx_spi_read_data(struct mvs_info *mvi)
+static u32 mvs_64xx_spi_read_data(struct mvs_info *mvi)
 {
void __iomem *regs = mvi->regs_ex;
return ior32(SPI_DATA_REG_64XX);
 }
 
-void mvs_64xx_spi_write_data(struct mvs_info *mvi, u32 data)
+static void mvs_64xx_spi_write_data(struct mvs_info *mvi, u32 data)
 {
void __iomem *regs = mvi->regs_ex;
 iow32(SPI_DATA_REG_64XX, data);
 }
 
 
-int mvs_64xx_spi_buildcmd(struct mvs_info *mvi,
-   u32  *dwCmd,
-   u8   cmd,
-   u8   read,
-   u8   length,
-   u32  addr
-   )
+static int mvs_64xx_spi_buildcmd(struct mvs_info *mvi,
+   u32  *dwCmd,
+   u8   cmd,
+   u8   read,
+   u8   length,
+   u32  addr
+   )
 {
u32  dwTmp;
 
@@ -705,7 +706,7 @@ int mvs_64xx_spi_buildcmd(struct mvs_info *mvi,
 }
 
 
-int mvs_64xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd)
+static int mvs_64xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd)
 {
void __iomem *regs = mvi->regs_ex;
int retry;
@@ -720,7 +721,7 @@ int mvs_64xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd)
return 0;
 }
 
-int mvs_64xx_spi_waitdataready(struct mvs_info *mvi, u32 timeout)
+static int mvs_64xx_spi_waitdataready(struct mvs_info *mvi, u32 timeout)
 {
void __iomem *regs = mvi->regs_ex;
u32 i, dwTmp;
@@ -735,8 +736,8 @@ int mvs_64xx_spi_waitdataready(struct mvs_info *mvi, u32 
timeout)
return -1;
 }
 
-void mvs_64xx_fix_dma(struct mvs_info *mvi, u32 phy_mask,
-   int buf_len, int from, void *prd)
+static void mvs_64xx_fix_dma(struct mvs_info *mvi, u32 phy_mask,
+int buf_len, int from, void *prd)
 {
int i;
struct mvs_prd *buf_prd = prd;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to 

[PATCH 31/55] scsi: Mark functions as static in mvsas/mv_sas.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in mvsas/mv_sas.c because they are not used
outside this file.

This eliminates the following warnings in mvsas/mv_sas.c:
drivers/scsi/mvsas/mv_sas.c:77:18: warning: no previous prototype for 
‘mvs_find_dev_mvi’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_sas.c:105:5: warning: no previous prototype for 
‘mvs_find_dev_phyno’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_sas.c:1260:20: warning: no previous prototype for 
‘mvs_alloc_dev’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_sas.c:1277:6: warning: no previous prototype for 
‘mvs_free_dev’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_sas.c:1287:5: warning: no previous prototype for 
‘mvs_dev_found_notify’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_sas.c:1343:6: warning: no previous prototype for 
‘mvs_dev_gone_notify’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_sas.c:1709:6: warning: no previous prototype for 
‘mvs_set_sense’ [-Wmissing-prototypes]
drivers/scsi/mvsas/mv_sas.c:1748:6: warning: no previous prototype for 
‘mvs_fill_ssp_resp_iu’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/mvsas/mv_sas.c |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index 6c1f223..80c2b1d 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -74,7 +74,7 @@ void mvs_tag_init(struct mvs_info *mvi)
mvs_tag_clear(mvi, i);
 }
 
-struct mvs_info *mvs_find_dev_mvi(struct domain_device *dev)
+static struct mvs_info *mvs_find_dev_mvi(struct domain_device *dev)
 {
unsigned long i = 0, j = 0, hi = 0;
struct sas_ha_struct *sha = dev->port->ha;
@@ -102,7 +102,7 @@ struct mvs_info *mvs_find_dev_mvi(struct domain_device *dev)
 
 }
 
-int mvs_find_dev_phyno(struct domain_device *dev, int *phyno)
+static int mvs_find_dev_phyno(struct domain_device *dev, int *phyno)
 {
unsigned long i = 0, j = 0, n = 0, num = 0;
struct mvs_device *mvi_dev = (struct mvs_device *)dev->lldd_dev;
@@ -1257,7 +1257,7 @@ void mvs_port_deformed(struct asd_sas_phy *sas_phy)
mvs_port_notify_deformed(sas_phy, 1);
 }
 
-struct mvs_device *mvs_alloc_dev(struct mvs_info *mvi)
+static struct mvs_device *mvs_alloc_dev(struct mvs_info *mvi)
 {
u32 dev;
for (dev = 0; dev < MVS_MAX_DEVICES; dev++) {
@@ -1274,7 +1274,7 @@ struct mvs_device *mvs_alloc_dev(struct mvs_info *mvi)
return NULL;
 }
 
-void mvs_free_dev(struct mvs_device *mvi_dev)
+static void mvs_free_dev(struct mvs_device *mvi_dev)
 {
u32 id = mvi_dev->device_id;
memset(mvi_dev, 0, sizeof(*mvi_dev));
@@ -1284,7 +1284,7 @@ void mvs_free_dev(struct mvs_device *mvi_dev)
mvi_dev->taskfileset = MVS_ID_NOT_MAPPED;
 }
 
-int mvs_dev_found_notify(struct domain_device *dev, int lock)
+static int mvs_dev_found_notify(struct domain_device *dev, int lock)
 {
unsigned long flags = 0;
int res = 0;
@@ -1340,7 +1340,7 @@ int mvs_dev_found(struct domain_device *dev)
return mvs_dev_found_notify(dev, 1);
 }
 
-void mvs_dev_gone_notify(struct domain_device *dev)
+static void mvs_dev_gone_notify(struct domain_device *dev)
 {
unsigned long flags = 0;
struct mvs_device *mvi_dev = dev->lldd_dev;
@@ -1706,7 +1706,7 @@ static int mvs_sata_done(struct mvs_info *mvi, struct 
sas_task *task,
return stat;
 }
 
-void mvs_set_sense(u8 *buffer, int len, int d_sense,
+static void mvs_set_sense(u8 *buffer, int len, int d_sense,
int key, int asc, int ascq)
 {
memset(buffer, 0, len);
@@ -1745,8 +1745,8 @@ void mvs_set_sense(u8 *buffer, int len, int d_sense,
return;
 }
 
-void mvs_fill_ssp_resp_iu(struct ssp_response_iu *iu,
-   u8 key, u8 asc, u8 asc_q)
+static void mvs_fill_ssp_resp_iu(struct ssp_response_iu *iu,
+u8 key, u8 asc, u8 asc_q)
 {
iu->datapres = 2;
iu->response_data_len = 0;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 30/55] scsi: Mark functions as static in megaraid/megaraid_sas_fp.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in megaraid/megaraid_sas_fp.c because they are
not used outside this file.

This eliminates the following warning in megaraid/megaraid_sas_fp.c:
drivers/scsi/megaraid/megaraid_sas_fp.c:80:5: warning: no previous prototype 
for ‘mega_mod64’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_fp.c:98:5: warning: no previous prototype 
for ‘mega_div64_32’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_fp.c:206:5: warning: no previous prototype 
for ‘MR_GetSpanBlock’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_fp.c:341:5: warning: no previous prototype 
for ‘mr_spanset_get_span_block’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_fp.c:582:4: warning: no previous prototype 
for ‘get_arm’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_fp.c:705:4: warning: no previous prototype 
for ‘MR_GetPhyParams’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_fp.c:1196:4: warning: no previous prototype 
for ‘megasas_get_best_arm’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/megaraid/megaraid_sas_fp.c |   26 ++
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c 
b/drivers/scsi/megaraid/megaraid_sas_fp.c
index e24b6eb..83d5f74 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fp.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fp.c
@@ -77,7 +77,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance 
*instance, u32 ld,
 static u64 get_row_from_strip(struct megasas_instance *instance, u32 ld,
u64 strip, struct MR_FW_RAID_MAP_ALL *map);
 
-u32 mega_mod64(u64 dividend, u32 divisor)
+static u32 mega_mod64(u64 dividend, u32 divisor)
 {
u64 d;
u32 remainder;
@@ -95,7 +95,7 @@ u32 mega_mod64(u64 dividend, u32 divisor)
  *
  * @return quotient
  **/
-u64 mega_div64_32(uint64_t dividend, uint32_t divisor)
+static u64 mega_div64_32(uint64_t dividend, uint32_t divisor)
 {
u32 remainder;
u64 d;
@@ -203,7 +203,7 @@ u8 MR_ValidateMapInfo(struct megasas_instance *instance)
return 1;
 }
 
-u32 MR_GetSpanBlock(u32 ld, u64 row, u64 *span_blk,
+static u32 MR_GetSpanBlock(u32 ld, u64 row, u64 *span_blk,
struct MR_FW_RAID_MAP_ALL *map)
 {
struct MR_SPAN_BLOCK_INFO *pSpanBlock = MR_LdSpanInfoGet(ld, map);
@@ -338,7 +338,7 @@ static int getSpanInfo(struct MR_FW_RAID_MAP_ALL *map, 
PLD_SPAN_INFO ldSpanInfo)
 *div_error- Devide error code.
 */
 
-u32 mr_spanset_get_span_block(struct megasas_instance *instance,
+static u32 mr_spanset_get_span_block(struct megasas_instance *instance,
u32 ld, u64 row, u64 *span_blk, struct MR_FW_RAID_MAP_ALL *map)
 {
struct fusion_context *fusion = instance->ctrl_context;
@@ -579,8 +579,8 @@ static u32 get_arm_from_strip(struct megasas_instance 
*instance,
 }
 
 /* This Function will return Phys arm */
-u8 get_arm(struct megasas_instance *instance, u32 ld, u8 span, u64 stripe,
-   struct MR_FW_RAID_MAP_ALL *map)
+static u8 get_arm(struct megasas_instance *instance, u32 ld, u8 span,
+ u64 stripe, struct MR_FW_RAID_MAP_ALL *map)
 {
struct MR_LD_RAID  *raid = MR_LdRaidGet(ld, map);
/* Need to check correct default value */
@@ -702,10 +702,11 @@ static u8 mr_spanset_get_phy_params(struct 
megasas_instance *instance, u32 ld,
 *span  - Span number
 *block - Absolute Block number in the physical disk
 */
-u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
-   u16 stripRef, struct IO_REQUEST_INFO *io_info,
-   struct RAID_CONTEXT *pRAID_Context,
-   struct MR_FW_RAID_MAP_ALL *map)
+static u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld,
+ u64 stripRow, u16 stripRef,
+ struct IO_REQUEST_INFO *io_info,
+ struct RAID_CONTEXT *pRAID_Context,
+ struct MR_FW_RAID_MAP_ALL *map)
 {
struct MR_LD_RAID  *raid = MR_LdRaidGet(ld, map);
u32 pd, arRef;
@@ -1193,8 +1194,9 @@ mr_update_load_balance_params(struct MR_FW_RAID_MAP_ALL 
*map,
}
 }
 
-u8 megasas_get_best_arm(struct LD_LOAD_BALANCE_INFO *lbInfo, u8 arm, u64 block,
-   u32 count)
+static u8 megasas_get_best_arm(struct LD_LOAD_BALANCE_INFO *lbInfo, u8 arm,
+  u64 block,
+  u32 count)
 {
u16 pend0, pend1;
u64 diff0, diff1;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 29/55] scsi: Mark functions as static in megaraid/megaraid_sas_fusion.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in megaraid/megaraid_sas_fusion.c because they
are not used outside this file.

This eliminates the warnings of following type in
megaraid/megaraid_sas_fusion.c:
drivers/scsi/megaraid/megaraid_sas_fusion.c:91:1: warning: no previous 
prototype for ‘megasas_enable_intr_fusion’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c |   39 ++-
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c 
b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 2806d6d..ce6219c 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -74,7 +74,7 @@ extern int resetwaittime;
  * megasas_enable_intr_fusion -Enables interrupts
  * @regs:  MFI register set
  */
-void
+static void
 megasas_enable_intr_fusion(struct megasas_instance *instance)
 {
struct megasas_register_set __iomem *regs;
@@ -94,7 +94,7 @@ megasas_enable_intr_fusion(struct megasas_instance *instance)
  * megasas_disable_intr_fusion - Disables interrupt
  * @regs:   MFI register set
  */
-void
+static void
 megasas_disable_intr_fusion(struct megasas_instance *instance)
 {
u32 mask = 0x;
@@ -134,8 +134,8 @@ megasas_clear_intr_fusion(struct megasas_register_set 
__iomem *regs)
  *
  * Returns a free command from the pool
  */
-struct megasas_cmd_fusion *megasas_get_cmd_fusion(struct megasas_instance
- *instance)
+static struct megasas_cmd_fusion *megasas_get_cmd_fusion(
+ struct megasas_instance *instance)
 {
unsigned long flags;
struct fusion_context *fusion =
@@ -363,7 +363,7 @@ static int megasas_create_frame_pool_fusion(struct 
megasas_instance *instance)
  * and is used as SMID of the cmd.
  * SMID value range is from 1 to max_fw_cmds.
  */
-int
+static int
 megasas_alloc_cmds_fusion(struct megasas_instance *instance)
 {
int i, j, count;
@@ -919,7 +919,7 @@ megasas_display_intel_branding(struct megasas_instance 
*instance)
  *
  * This is the main function for initializing firmware.
  */
-u32
+static u32
 megasas_init_adapter_fusion(struct megasas_instance *instance)
 {
struct megasas_register_set __iomem *reg_set;
@@ -1037,7 +1037,7 @@ fail_alloc_mfi_cmds:
  * @frame_count :  Number of frames for the command
  * @regs : MFI register set
  */
-void
+static void
 megasas_fire_cmd_fusion(struct megasas_instance *instance,
dma_addr_t req_desc_lo,
u32 req_desc_hi,
@@ -1059,7 +1059,7 @@ megasas_fire_cmd_fusion(struct megasas_instance *instance,
  * @ext_status :   ext status of cmd returned by FW
  */
 
-void
+static void
 map_cmd_status(struct megasas_cmd_fusion *cmd, u8 status, u8 ext_status)
 {
 
@@ -1199,7 +1199,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance,
  *
  * Used to set the PD LBA in CDB for FP IOs
  */
-void
+static void
 megasas_set_pd_lba(struct MPI2_RAID_SCSI_IO_REQUEST *io_request, u8 cdb_len,
   struct IO_REQUEST_INFO *io_info, struct scsi_cmnd *scp,
   struct MR_FW_RAID_MAP_ALL *local_map_ptr, u32 ref_tag)
@@ -1376,7 +1376,7 @@ megasas_set_pd_lba(struct MPI2_RAID_SCSI_IO_REQUEST 
*io_request, u8 cdb_len,
  * Prepares the io_request and chain elements (sg_frame) for IO
  * The IO can be for PD (Fast Path) or LD
  */
-void
+static void
 megasas_build_ldio_fusion(struct megasas_instance *instance,
  struct scsi_cmnd *scp,
  struct megasas_cmd_fusion *cmd)
@@ -1678,7 +1678,7 @@ NonFastPath:
  * Invokes helper functions to prepare request frames
  * and sets flags appropriate for IO/Non-IO cmd
  */
-int
+static int
 megasas_build_io_fusion(struct megasas_instance *instance,
struct scsi_cmnd *scp,
struct megasas_cmd_fusion *cmd)
@@ -1749,7 +1749,7 @@ megasas_build_io_fusion(struct megasas_instance *instance,
return 0;
 }
 
-union MEGASAS_REQUEST_DESCRIPTOR_UNION *
+static union MEGASAS_REQUEST_DESCRIPTOR_UNION *
 megasas_get_request_descriptor(struct megasas_instance *instance, u16 index)
 {
u8 *p;
@@ -1829,7 +1829,7 @@ megasas_build_and_issue_cmd_fusion(struct 
megasas_instance *instance,
  * @instance:  Adapter soft state
  * Completes all commands that is in reply descriptor queue
  */
-int
+static int
 complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex)
 {
union MPI2_REPLY_DESCRIPTORS_UNION *desc;
@@ -1974,7 +1974,7 @@ complete_cmd_fusion(struct megasas_instance *instance, 
u32 MSIxIndex)
  *
  * Tasklet to complete cmds
  */
-void
+static void
 megasas_complete_cmd_dpc_fusion(unsigned long instance_addr)
 {
struct megasas_instance *instance =
@@ 

[PATCH 28/55] scsi: Move prototype declaration to appropriate header file megaraid/megaraid_sas.h from megaraid/megaraid_sas_fusion.c

2014-03-29 Thread Rashika Kheria
Move prototype declarations of function to header file
scsi/megaraid/megaraid_sas.h from megaraid/megaraid_sas_fusion.c because
they are used by more than one file.

This eliminates the following warning in megaraid/megaraid_sas_fusion.c:
drivers/scsi/megaraid/megaraid_sas_base.c:192:21: warning: no previous 
prototype for ‘megasas_get_cmd’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:218:1: warning: no previous prototype 
for ‘megasas_return_cmd’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:878:1: warning: no previous prototype 
for ‘megasas_issue_polled’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:1364:12: warning: no previous 
prototype for ‘megasas_is_ldio’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:1639:6: warning: no previous 
prototype for ‘megaraid_sas_kill_hba’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:1659:1: warning: no previous 
prototype for ‘megasas_check_and_restore_queue_depth’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:3030:6: warning: no previous 
prototype for ‘megasas_free_cmds’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:3066:5: warning: no previous 
prototype for ‘megasas_alloc_cmds’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/megaraid/megaraid_sas.h|   14 ++
 drivers/scsi/megaraid/megaraid_sas_fusion.c |   13 -
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.h 
b/drivers/scsi/megaraid/megaraid_sas.h
index 34452ea..3b0afb4 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -1723,6 +1723,20 @@ struct megasas_mgmt_info {
int max_index;
 };
 
+struct megasas_cmd *megasas_get_cmd(struct megasas_instance
+   *instance);
+void
+megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd);
+int
+megasas_issue_polled(struct megasas_instance *instance,
+struct megasas_cmd *cmd);
+int megasas_is_ldio(struct scsi_cmnd *cmd);
+void megaraid_sas_kill_hba(struct megasas_instance *instance);
+void
+megasas_check_and_restore_queue_depth(struct megasas_instance *instance);
+void megasas_free_cmds(struct megasas_instance *instance);
+int megasas_alloc_cmds(struct megasas_instance *instance);
+
 u8
 MR_BuildRaidContext(struct megasas_instance *instance,
struct IO_REQUEST_INFO *io_info,
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c 
b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index f655592..2806d6d 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -54,31 +54,18 @@
 #include "megaraid_sas_fusion.h"
 #include "megaraid_sas.h"
 
-extern void megasas_free_cmds(struct megasas_instance *instance);
-extern struct megasas_cmd *megasas_get_cmd(struct megasas_instance
-  *instance);
 extern void
 megasas_complete_cmd(struct megasas_instance *instance,
 struct megasas_cmd *cmd, u8 alt_status);
-int megasas_is_ldio(struct scsi_cmnd *cmd);
 int
 wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd);
 
-void
-megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd);
-int megasas_alloc_cmds(struct megasas_instance *instance);
 int
 megasas_clear_intr_fusion(struct megasas_register_set __iomem *regs);
-int
-megasas_issue_polled(struct megasas_instance *instance,
-struct megasas_cmd *cmd);
-void
-megasas_check_and_restore_queue_depth(struct megasas_instance *instance);
 
 u16 get_updated_dev_handle(struct LD_LOAD_BALANCE_INFO *lbInfo,
   struct IO_REQUEST_INFO *in_info);
 int megasas_transition_to_ready(struct megasas_instance *instance, int ocr);
-void megaraid_sas_kill_hba(struct megasas_instance *instance);
 
 extern u32 megasas_dbg_lvl;
 extern int resetwaittime;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Regression, bisected 9e30cc] "sysfs, kernfs: no need to kern_mount() sysfs from sysfs_init()" prevents system from booting correctly

2014-03-29 Thread Tejun Heo
Hello, Alexander.

On Thu, Mar 27, 2014 at 01:47:53PM -0400, Alexandre Demers wrote:
> I'll do my best, but I just don't have enough time right now for
> everything I have to do at home and dig this bug. I may be able to
> look at it in the next couple of days though, or it may go somewhere
> next week... That being said, I tried yesterday to have a better idea
> and I thank you for the "ScrLck" trick, I didn't know that it was
> working. Nevertheless I didn't find anything.
>
> It seems as if the transition from the temporary kernel's fs to the
> hard disk's fs is not done correctly. If I boot with a working kernel
> after that, I can't find any trace of where it was trying to copy the
> files or of any partition being full. Could it be filling the RAM
> until it reaches its maximum capacity (16GB to fill before hitting the
> limit and throwing the errors)? That would explain at least why it
> takes so much time before the flood of errors begins...

That could definitely be the case.  I'd really like to get to the
bottom of it.  It's really curious that there aren't more people
reporting the same problem.  Can you please try whether the following
patch makes the regression go away?

Thanks!

diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index a66ad61..a3223e2 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -75,5 +75,7 @@ int __init sysfs_init(void)
return err;
}
 
+   WARN_ON(IS_ERR(kern_mount(_fs_type)));
+
return 0;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 27/55] scsi: Mark functions as static in megaraid/megaraid_sas_base.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in megaraid/megaraid_sas_base.c because they
are not used outside this file.

This eliminates the following warnings in megaraid/megaraid_sas_base.c:
drivers/scsi/megaraid/megaraid_sas_base.c:180:1: warning: no previous prototype 
for ‘megasas_issue_dcmd’ [-Wmissing-prototypes]
drivers/scsi/megaraid/megaraid_sas_base.c:1739:6: warning: no previous 
prototype for ‘megasas_do_ocr’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/megaraid/megaraid_sas_base.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c 
b/drivers/scsi/megaraid/megaraid_sas_base.c
index 3b7ad10..9768deee 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -176,7 +176,7 @@ void megasas_reset_reply_desc(struct megasas_instance 
*instance);
 int megasas_reset_fusion(struct Scsi_Host *shost);
 void megasas_fusion_ocr_wq(struct work_struct *work);
 
-void
+static void
 megasas_issue_dcmd(struct megasas_instance *instance, struct megasas_cmd *cmd)
 {
instance->instancet->fire_cmd(instance,
@@ -1736,7 +1736,7 @@ megasas_internal_reset_defer_cmds(struct megasas_instance 
*instance);
 static void
 process_fw_state_change_wq(struct work_struct *work);
 
-void megasas_do_ocr(struct megasas_instance *instance)
+static void megasas_do_ocr(struct megasas_instance *instance)
 {
if ((instance->pdev->device == PCI_DEVICE_ID_LSI_SAS1064R) ||
(instance->pdev->device == PCI_DEVICE_ID_DELL_PERC5) ||
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 26/55] scsi: Mark function as static in lpfc/lpfc_bsg.c

2014-03-29 Thread Rashika Kheria
Mark function as static in lpfc/lpfc_bsg.c because it is not used
outside this file.

This eliminates the following warning in lpfc/lpfc_bsg.c:
drivers/scsi/lpfc/lpfc_bsg.c:3348:1: warning: no previous prototype for 
‘lpfc_bsg_issue_mbox_cmpl’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/lpfc/lpfc_bsg.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index 82134d2..4735de5 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -3344,7 +3344,7 @@ job_error:
  * will wake up thread waiting on the wait queue pointed by context1
  * of the mailbox.
  **/
-void
+static void
 lpfc_bsg_issue_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq)
 {
struct bsg_job_data *dd_data;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 25/55] scsi: Mark functions as static in lpfc/lpfc_scsi.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in lpfc/lpfc_scsi.c because they are not used
outside this file.

This eliminates the following warnings in lpfc/lpfc_scsi.c:
drivers/scsi/lpfc/lpfc_scsi.c:299:1: warning: no previous prototype for 
‘lpfc_change_queue_depth’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_scsi.c:795:1: warning: no previous prototype for 
‘lpfc_sli4_post_scsi_sgl_list’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_scsi.c:3019:1: warning: no previous prototype for 
‘lpfc_bg_crc’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_scsi.c:3035:1: warning: no previous prototype for 
‘lpfc_bg_csum’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_scsi.c:3048:1: warning: no previous prototype for 
‘lpfc_calc_bg_err’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/lpfc/lpfc_scsi.c |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index b2ede05..75844a8e 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -295,7 +295,7 @@ lpfc_send_sdev_queuedepth_change_event(struct lpfc_hba 
*phba,
  * depth for a scsi device. This function sets the queue depth to the new
  * value and sends an event out to log the queue depth change.
  **/
-int
+static int
 lpfc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
 {
struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata;
@@ -791,7 +791,7 @@ lpfc_sli4_fcp_xri_aborted(struct lpfc_hba *phba,
  *
  * Returns: 0 = failure, non-zero number of successfully posted buffers.
  **/
-int
+static int
 lpfc_sli4_post_scsi_sgl_list(struct lpfc_hba *phba,
 struct list_head *post_sblist, int sb_count)
 {
@@ -3015,7 +3015,7 @@ err:
  * on the specified data using a CRC algorithmn
  * using crc_t10dif.
  */
-uint16_t
+static uint16_t
 lpfc_bg_crc(uint8_t *data, int count)
 {
uint16_t crc = 0;
@@ -3031,7 +3031,7 @@ lpfc_bg_crc(uint8_t *data, int count)
  * on the specified data using a CSUM algorithmn
  * using ip_compute_csum.
  */
-uint16_t
+static uint16_t
 lpfc_bg_csum(uint8_t *data, int count)
 {
uint16_t ret;
@@ -3044,7 +3044,7 @@ lpfc_bg_csum(uint8_t *data, int count)
  * This function examines the protection data to try to determine
  * what type of T10-DIF error occurred.
  */
-void
+static void
 lpfc_calc_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd)
 {
struct scatterlist *sgpe; /* s/g prot entry */
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 24/55] scsi: Mark functions as static in lpfc/lpfc_init.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in lpfc/lpfc_init.c because they are not used
outside this file.

This eliminates the following warning in lpfc/lpfc_init.c:
drivers/scsi/lpfc/lpfc_init.c:652:1: warning: no previous prototype for 
‘lpfc_hba_init_link’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_init.c:753:1: warning: no previous prototype for 
‘lpfc_hba_down_link’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_init.c:3434:1: warning: no previous prototype for 
‘lpfc_sli4_fcf_redisc_wait_tmo’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/lpfc/lpfc_init.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 68c94cc..508c7b9 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -648,7 +648,7 @@ lpfc_config_port_post(struct lpfc_hba *phba)
  * 0 - success
  * Any other value - error
  **/
-int
+static int
 lpfc_hba_init_link(struct lpfc_hba *phba, uint32_t flag)
 {
return lpfc_hba_init_link_fc_topology(phba, phba->cfg_topology, flag);
@@ -749,7 +749,7 @@ lpfc_hba_init_link_fc_topology(struct lpfc_hba *phba, 
uint32_t fc_topology,
  * 0 - success
  * Any other value - error
  **/
-int
+static int
 lpfc_hba_down_link(struct lpfc_hba *phba, uint32_t flag)
 {
LPFC_MBOXQ_t *pmb;
@@ -3430,7 +3430,7 @@ lpfc_fcf_redisc_wait_start_timer(struct lpfc_hba *phba)
  * list, and then worker thread shall be waked up for processing from the
  * worker thread context.
  **/
-void
+static void
 lpfc_sli4_fcf_redisc_wait_tmo(unsigned long ptr)
 {
struct lpfc_hba *phba = (struct lpfc_hba *)ptr;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging: panel: Unnecessary space

2014-03-29 Thread paulmcquad
>From 411c46d97c06fba1e45312342fa1618eef8429cd Mon Sep 17 00:00:00 2001
From: Paul McQuade 
Date: Sat, 29 Mar 2014 18:01:19 +
Subject: [PATCH] Staging: panel: Unnecessary space

Removed space after function pointer name

Signed-off-by: Paul McQuade 
---
 drivers/staging/panel/panel.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index ec4b1fd..35e00f0 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -171,8 +171,8 @@ struct logical_input {
 
 union {
 struct {/* valid when type == INPUT_TYPE_STD */
-void (*press_fct) (int);
-void (*release_fct) (int);
+void (*press_fct)(int);
+void (*release_fct)(int);
 int press_data;
 int release_data;
 } std;
@@ -417,9 +417,9 @@ static char lcd_must_clear;
 static char lcd_left_shift;
 static char init_in_progress;
 
-static void (*lcd_write_cmd) (int);
-static void (*lcd_write_data) (int);
-static void (*lcd_clear_fast) (void);
+static void (*lcd_write_cmd)(int);
+static void (*lcd_write_data)(int);
+static void (*lcd_clear_fast)(void);
 
 static DEFINE_SPINLOCK(pprt_lock);
 static struct timer_list scan_timer;
@@ -2017,9 +2017,9 @@ static struct logical_input *panel_bind_key(const char 
*name, const char *press,
  * be bound.
  */
 static struct logical_input *panel_bind_callback(char *name,
- void (*press_fct) (int),
+ void (*press_fct)(int),
  int press_data,
- void (*release_fct) (int),
+ void (*release_fct)(int),
  int release_data)
 {
 struct logical_input *callback;
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 23/55] scsi: Mark functions as static in lpfc/lpfc_hbadisc.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in lpfc/lpfc_hbadisc.c because they are not
used outside this file.

This eliminates the following warnings in lpfc/lpfc_hbadisc.c:
drivers/scsi/lpfc/lpfc_hbadisc.c:2047:5: warning: no previous prototype for 
‘lpfc_sli4_fcf_pri_list_add’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_hbadisc.c:2681:1: warning: no previous prototype for 
‘lpfc_init_vfi_cmpl’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_hbadisc.c:4432:1: warning: no previous prototype for 
‘lpfc_nlp_logo_unreg’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/lpfc/lpfc_hbadisc.c |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 883ea2d..0441d50 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -2044,7 +2044,8 @@ lpfc_sli4_set_fcf_flogi_fail(struct lpfc_hba *phba, 
uint16_t fcf_index)
  * returns:
  * 0=success 1=failure
  **/
-int lpfc_sli4_fcf_pri_list_add(struct lpfc_hba *phba, uint16_t fcf_index,
+static int lpfc_sli4_fcf_pri_list_add(struct lpfc_hba *phba,
+   uint16_t fcf_index,
struct fcf_record *new_fcf_record)
 {
uint16_t current_fcf_pri;
@@ -2677,7 +2678,7 @@ out:
  *
  * This function handles completion of init vfi mailbox command.
  */
-void
+static void
 lpfc_init_vfi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
 {
struct lpfc_vport *vport = mboxq->vport;
@@ -4428,7 +4429,7 @@ lpfc_no_rpi(struct lpfc_hba *phba, struct lpfc_nodelist 
*ndlp)
  * This function will issue an ELS LOGO command after completing
  * the UNREG_RPI.
  **/
-void
+static void
 lpfc_nlp_logo_unreg(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
 {
struct lpfc_vport  *vport = pmb->vport;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 22/55] scsi: Mark functions as static in lpfc/lpfc_sli.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in lpfc/lpfc_sli.c because they are not used
outside this file.

This eliminates the following warnings in lpfc/lpfc_sli.c:
drivers/scsi/lpfc/lpfc_sli.c:13867:1: warning: no previous prototype for 
‘lpfc_sli4_alloc_xri’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_sli.c:13897:1: warning: no previous prototype for 
‘__lpfc_sli4_free_xri’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_sli.c:14317:1: warning: no previous prototype for 
‘lpfc_update_rcv_time_stamp’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_sli.c:14786:1: warning: no previous prototype for 
‘lpfc_sli4_handle_unsol_abort’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_sli.c:15331:1: warning: no previous prototype for 
‘__lpfc_sli4_free_rpi’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_sli.c:15769:1: warning: no previous prototype for 
‘lpfc_check_next_fcf_pri_level’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_sli.c:16000:1: warning: no previous prototype for 
‘lpfc_mbx_cmpl_redisc_fcf_table’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/lpfc/lpfc_sli.c |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 8f580fd..150095b 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -13863,7 +13863,7 @@ lpfc_sli4_post_sgl(struct lpfc_hba *phba,
  * A nonzero rpi defined as rpi_base <= rpi < max_rpi if successful
  * LPFC_RPI_ALLOC_ERROR if no rpis are available.
  **/
-uint16_t
+static uint16_t
 lpfc_sli4_alloc_xri(struct lpfc_hba *phba)
 {
unsigned long xri;
@@ -13893,7 +13893,7 @@ lpfc_sli4_alloc_xri(struct lpfc_hba *phba)
  * This routine is invoked to release an xri to the pool of
  * available rpis maintained by the driver.
  **/
-void
+static void
 __lpfc_sli4_free_xri(struct lpfc_hba *phba, int xri)
 {
if (test_and_clear_bit(xri, phba->sli4_hba.xri_bmask)) {
@@ -14313,7 +14313,7 @@ lpfc_fc_frame_to_vport(struct lpfc_hba *phba, struct 
fc_frame_header *fc_hdr,
  * the driver uses this time stamp to indicate if any received sequences have
  * timed out.
  **/
-void
+static void
 lpfc_update_rcv_time_stamp(struct lpfc_vport *vport)
 {
struct lpfc_dmabuf *h_buf;
@@ -14782,7 +14782,7 @@ lpfc_sli4_seq_abort_rsp(struct lpfc_vport *vport,
  * unsolicited sequence has been aborted. After that, it will issue a basic
  * accept to accept the abort.
  **/
-void
+static void
 lpfc_sli4_handle_unsol_abort(struct lpfc_vport *vport,
 struct hbq_dmabuf *dmabuf)
 {
@@ -15327,7 +15327,7 @@ lpfc_sli4_alloc_rpi(struct lpfc_hba *phba)
  * This routine is invoked to release an rpi to the pool of
  * available rpis maintained by the driver.
  **/
-void
+static void
 __lpfc_sli4_free_rpi(struct lpfc_hba *phba, int rpi)
 {
if (test_and_clear_bit(rpi, phba->sli4_hba.rpi_bmask)) {
@@ -15765,7 +15765,7 @@ fail_fcf_read:
  * returns:
  * 1=success 0=failure
  **/
-int
+static int
 lpfc_check_next_fcf_pri_level(struct lpfc_hba *phba)
 {
uint16_t next_fcf_pri;
@@ -15996,7 +15996,7 @@ lpfc_sli4_fcf_rr_index_clear(struct lpfc_hba *phba, 
uint16_t fcf_index)
  * command. If the mailbox command returned failure, it will try to stop the
  * FCF rediscover wait timer.
  **/
-void
+static void
 lpfc_mbx_cmpl_redisc_fcf_table(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox)
 {
struct lpfc_mbx_redisc_fcf_tbl *redisc_fcf;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 21/55] scsi: Mark function as static in isci/port.c

2014-03-29 Thread Rashika Kheria
Mark function as static in isci/port.c because they are not used outside
this file.

This eliminates the following warning in isci/port.c:
drivers/scsi/isci/port.c:65:13: warning: no previous prototype for 
‘port_state_name’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/isci/port.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
index 13098b0..225d39f 100644
--- a/drivers/scsi/isci/port.c
+++ b/drivers/scsi/isci/port.c
@@ -62,7 +62,7 @@
 
 #undef C
 #define C(a) (#a)
-const char *port_state_name(enum sci_port_states state)
+static const char *port_state_name(enum sci_port_states state)
 {
static const char * const strings[] = PORT_STATES;
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 20/55] scsi: Mark function as static in isci/remote_device.c

2014-03-29 Thread Rashika Kheria
Mark function as static in isci/remote_device.c because it is not used
outside this file.

This eliminates the following warning in isci/remote_device.c:
drivers/scsi/isci/remote_device.c:1387:6: warning: no previous prototype for 
‘isci_remote_device_wait_for_resume_from_abort’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/isci/remote_device.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/isci/remote_device.c 
b/drivers/scsi/isci/remote_device.c
index 96a26f4..33033fb 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -1384,7 +1384,7 @@ static bool isci_remote_device_test_resume_done(
return done;
 }
 
-void isci_remote_device_wait_for_resume_from_abort(
+static void isci_remote_device_wait_for_resume_from_abort(
struct isci_host *ihost,
struct isci_remote_device *idev)
 {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 19/55] scsi: Mark function as static in isci/phy.c

2014-03-29 Thread Rashika Kheria
Mark function as static in isci/phy.c because it is not used outside
this file.

This eliminates the following warning in isci/phy.c:
drivers/scsi/isci/phy.c:672:6: warning: no previous prototype for 
‘scu_link_layer_set_txcomsas_timeout’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/isci/phy.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index cb87b2e..8e21022 100644
--- a/drivers/scsi/isci/phy.c
+++ b/drivers/scsi/isci/phy.c
@@ -669,7 +669,8 @@ static const char *phy_event_name(u32 event_code)
phy_state_name(state), phy_event_name(code), code)
 
 
-void scu_link_layer_set_txcomsas_timeout(struct isci_phy *iphy, u32 timeout)
+static void scu_link_layer_set_txcomsas_timeout(struct isci_phy *iphy,
+   u32 timeout)
 {
u32 val;
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 18/55] scsi: Mark function as static in cxgbi/cxgb4i/cxgb4i.c

2014-03-29 Thread Rashika Kheria
Mark function as static in cxgb4i/cxgb4i.c because it is not used
outside this file.

This eliminates the following warning in cxgb4i/cxgb4i.c:
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:1299:5: warning: no previous prototype for 
‘cxgb4i_ofld_init’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c 
b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 5a9f842..b84ccef 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -1296,7 +1296,7 @@ cxgb4i_cplhandler_func cxgb4i_cplhandlers[NUM_CPL_CMDS] = 
{
[CPL_RX_ISCSI_DDP] = do_rx_data_ddp,
 };
 
-int cxgb4i_ofld_init(struct cxgbi_device *cdev)
+static int cxgb4i_ofld_init(struct cxgbi_device *cdev)
 {
int rc;
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 17/55] scsi: Mark function as static in cxgbi/cxgb3i/cxgb3i.c

2014-03-29 Thread Rashika Kheria
Mark function as static in cxgbi/cxgb3i/cxgb3i.c because it is not used
outside this file.

This eliminates the following warning in cxgbi/cxgb3i/cxgb3i.c:
drivers/scsi/cxgbi/cxgb3i/cxgb3i.c:1028:5: warning: no previous prototype for 
‘cxgb3i_ofld_init’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/cxgbi/cxgb3i/cxgb3i.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c 
b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
index 49692a1..6de59c5 100644
--- a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
+++ b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
@@ -1025,7 +1025,7 @@ cxgb3_cpl_handler_func cxgb3i_cpl_handlers[NUM_CPL_CMDS] 
= {
  * cxgb3i_ofld_init - allocate and initialize resources for each adapter found
  * @cdev:  cxgbi adapter
  */
-int cxgb3i_ofld_init(struct cxgbi_device *cdev)
+static int cxgb3i_ofld_init(struct cxgbi_device *cdev)
 {
struct t3cdev *t3dev = (struct t3cdev *)cdev->lldev;
struct adap_ports port;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 16/55] scsi: Mark function as static in cxgbi/libcxgbi.c

2014-03-29 Thread Rashika Kheria
Mark function as static in cxgbi/libcxgbi.c because it is not used
outside this file.

This eliminates the following warning in cxgbi/libcxgbi.c:
drivers/scsi/cxgbi/libcxgbi.c:1307:5: warning: no previous prototype for 
‘cxgbi_ddp_reserve’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/cxgbi/libcxgbi.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index b44c1cf..db6bf76 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -1304,7 +1304,7 @@ unmark_entries:
return err;
 }
 
-int cxgbi_ddp_reserve(struct cxgbi_sock *csk, unsigned int *tagp,
+static int cxgbi_ddp_reserve(struct cxgbi_sock *csk, unsigned int *tagp,
unsigned int sw_tag, unsigned int xferlen,
struct scatterlist *sgl, unsigned int sgcnt, gfp_t gfp)
 {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 15/55] scsi: Mark function as static in bnx2fc/bnx2fc_io.c

2014-03-29 Thread Rashika Kheria
Mark function as static in bnx2fc/bnx2fc_io.c because it is not used
outside this file.

This eliminates the following warning in bnx2fc/bnx2fc_io.c:
drivers/scsi/bnx2fc/bnx2fc_io.c:1108:5: warning: no previous prototype for 
‘bnx2fc_expl_logo’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/bnx2fc/bnx2fc_io.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index ed88089..dfa72bf 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1105,7 +1105,7 @@ int bnx2fc_eh_device_reset(struct scsi_cmnd *sc_cmd)
return bnx2fc_initiate_tmf(sc_cmd, FCP_TMF_LUN_RESET);
 }
 
-int bnx2fc_expl_logo(struct fc_lport *lport, struct bnx2fc_cmd *io_req)
+static int bnx2fc_expl_logo(struct fc_lport *lport, struct bnx2fc_cmd *io_req)
 {
struct bnx2fc_rport *tgt = io_req->tgt;
struct fc_rport_priv *rdata = tgt->rdata;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 14/55] scsi: Mark function as static in bnx2fc/bnx2fc_hwi.c

2014-03-29 Thread Rashika Kheria
Mark function as static in bnx2fc/bnx2fc_hwi.c because it is not used
outside this file.

This eliminates the following warning in bnx2fc/bnx2fc_hwi.c:
drivers/scsi/bnx2fc/bnx2fc_hwi.c:996:21: warning: no previous prototype for 
‘bnx2fc_alloc_work’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/bnx2fc/bnx2fc_hwi.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 46a3765..7f01cda 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
@@ -993,7 +993,7 @@ void bnx2fc_arm_cq(struct bnx2fc_rport *tgt)
 
 }
 
-struct bnx2fc_work *bnx2fc_alloc_work(struct bnx2fc_rport *tgt, u16 wqe)
+static struct bnx2fc_work *bnx2fc_alloc_work(struct bnx2fc_rport *tgt, u16 wqe)
 {
struct bnx2fc_work *work;
work = kzalloc(sizeof(struct bnx2fc_work), GFP_ATOMIC);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 13/55] scsi: Mark function as static in bnx2fc/bnx2fc_fcoe.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in bnx2fc/bnx2fc_fcoe.c because they are not
used outside this file.

This eliminates the following warnings in bnx2fc/bnx2fc_fcoe.c:
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:599:5: warning: no previous prototype for 
‘bnx2fc_percpu_io_thread’ [-Wmissing-prototypes]
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1365:26: warning: no previous prototype for 
‘bnx2fc_interface_create’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c 
b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 9b94850..b03f0c6 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -596,7 +596,7 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)
  *
  * @arg:   ptr to bnx2fc_percpu_info structure
  */
-int bnx2fc_percpu_io_thread(void *arg)
+static int bnx2fc_percpu_io_thread(void *arg)
 {
struct bnx2fc_percpu_s *p = arg;
struct bnx2fc_work *work, *tmp;
@@ -1362,9 +1362,9 @@ bind_err:
return NULL;
 }
 
-struct bnx2fc_interface *bnx2fc_interface_create(struct bnx2fc_hba *hba,
- struct net_device *netdev,
- enum fip_state fip_mode)
+static struct bnx2fc_interface *bnx2fc_interface_create(struct bnx2fc_hba *hba,
+   struct net_device *netdev,
+   enum fip_state fip_mode)
 {
struct fcoe_ctlr_device *ctlr_dev;
struct bnx2fc_interface *interface;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-29 Thread OGAWA Hirofumi
Conrad Meyer  writes:

Hi,

> When possible, infer DOS 2.x BIOS Parameter Block from block device
> geometry (for floppies and floppy images). Update in-memory only. We
> only perform this update when the entire BPB region is zeroed, like
> produced by DOS 1.x-era FORMAT (and other OEM variations on DOS).
>
> Fixes kernel.org bug #42617.
>
> BPB default values are inferred from media size and a table.[0] Media
> size is assumed to be static for archaic FAT volumes. See also [1].
>
> [0]: https://en.wikipedia.org/wiki/File_Allocation_Table#Exceptions
> [1]: http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html

[...]

> +static void fat_update_archaic_boot_sector(struct super_block *sb,
> + struct fat_boot_sector *b)
> +{
> + sector_t bd_sects;
> +
> + if (get_unaligned_le16(>sector_size) != 0 || b->sec_per_clus != 0 ||
> + b->reserved != 0 || b->fats != 0 ||
> + get_unaligned_le16(>dir_entries) != 0 ||
> + get_unaligned_le16(>sectors) != 0 || b->media != 0 ||
> + b->fat_length != 0 || b->secs_track != 0 || b->heads != 0 ||
> + b->secs_track != 0 || b->heads != 0)
> + return;
> +
> + bd_sects = part_nr_sects_read(sb->s_bdev->bd_part);
> + switch (bd_sects) {
> + case 160 * KB_IN_SECTORS:
> + b->sec_per_clus = 1;
> + put_unaligned_le16(64, >dir_entries);
> + b->media = 0xFE;
> + b->fat_length = cpu_to_le16(1);
> + break;

[...]

Hm, this looks like check the volume size. But if there is newer fat
format on same volume size, how to detect it? Or, it is conflicting?

[BTW, we should avoid to mount if it doesn't seem fatfs, to prevent
mis-mount as fatfs (auto mount is depending on this detection).]

Thanks.
-- 
OGAWA Hirofumi 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 12/55] scsi: Mark function as static in bnx2fc/bnx2fc_els.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in bnx2fc/bnx2fc_els.c because they are not
used outside this file.

This eliminates the following warning in bnx2fc/bnx2fc_els.c:
drivers/scsi/bnx2fc/bnx2fc_els.c:256:6: warning: no previous prototype for 
‘bnx2fc_srr_compl’ [-Wmissing-prototypes]
drivers/scsi/bnx2fc/bnx2fc_els.c:366:6: warning: no previous prototype for 
‘bnx2fc_rec_compl’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/bnx2fc/bnx2fc_els.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_els.c b/drivers/scsi/bnx2fc/bnx2fc_els.c
index b1c9a4f..3121da5 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_els.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_els.c
@@ -253,7 +253,7 @@ int bnx2fc_send_rls(struct bnx2fc_rport *tgt, struct 
fc_frame *fp)
return rc;
 }
 
-void bnx2fc_srr_compl(struct bnx2fc_els_cb_arg *cb_arg)
+static void bnx2fc_srr_compl(struct bnx2fc_els_cb_arg *cb_arg)
 {
struct bnx2fc_mp_req *mp_req;
struct fc_frame_header *fc_hdr, *fh;
@@ -363,7 +363,7 @@ srr_compl_done:
kref_put(_io_req->refcount, bnx2fc_cmd_release);
 }
 
-void bnx2fc_rec_compl(struct bnx2fc_els_cb_arg *cb_arg)
+static void bnx2fc_rec_compl(struct bnx2fc_els_cb_arg *cb_arg)
 {
struct bnx2fc_cmd *orig_io_req, *new_io_req;
struct bnx2fc_cmd *rec_req;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


You have received 1.5m pounds as donation see link www.bbc.co.uk/news/uk-england-19254228 send name address and phone number for info

2014-03-29 Thread Adrian Gillian Bayford
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 11/55] scsi: Mark function as static in bfa/bfa_svc.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in bfa/bfa_svc.c because they are not used
outside this file.

This eliminates the following warning in bfa/bfa_svc.c:
drivers/scsi/bfa/bfa_svc.c:4378:1: warning: no previous prototype for 
‘bfa_fcport_ddportenable’ [-Wmissing-prototypes]
drivers/scsi/bfa/bfa_svc.c:4387:1: warning: no previous prototype for 
‘bfa_fcport_ddportdisable’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/bfa/bfa_svc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c
index 625225f..a8329d3 100644
--- a/drivers/scsi/bfa/bfa_svc.c
+++ b/drivers/scsi/bfa/bfa_svc.c
@@ -4374,7 +4374,7 @@ bfa_fcport_dportdisable(struct bfa_s *bfa)
bfa_port_set_dportenabled(>modules.port, BFA_FALSE);
 }
 
-void
+static void
 bfa_fcport_ddportenable(struct bfa_s *bfa)
 {
/*
@@ -4383,7 +4383,7 @@ bfa_fcport_ddportenable(struct bfa_s *bfa)
bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_DDPORTENABLE);
 }
 
-void
+static void
 bfa_fcport_ddportdisable(struct bfa_s *bfa)
 {
/*
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 10/55] scsi: Mark function as static in bfa/bfa_core.c

2014-03-29 Thread Rashika Kheria
Mark function as static in bfa/bfa_core.c because it is not used outside
this file.

This eliminates the following warning in bfa/bfa_core.c:
drivers/scsi/bfa/bfa_core.c:716:1: warning: no previous prototype for 
‘bfa_isr_rspq’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/bfa/bfa_core.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c
index e3f67b0..2a613d2 100644
--- a/drivers/scsi/bfa/bfa_core.c
+++ b/drivers/scsi/bfa/bfa_core.c
@@ -712,7 +712,7 @@ bfa_reqq_resume(struct bfa_s *bfa, int qid)
}
 }
 
-bfa_boolean_t
+static bfa_boolean_t
 bfa_isr_rspq(struct bfa_s *bfa, int qid)
 {
struct bfi_msg_s *m;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 09/55] scsi: Mark function as static in bfa/bfa_fcpim.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in bfa/bfa_fcpim.c because they are not used
outside this file.

This eliminates the following warning in bfa/bfa_fcpim.c:
drivers/scsi/bfa/bfa_fcpim.c:448:1: warning: no previous prototype for 
‘bfa_ioim_profile_comp’ [-Wmissing-prototypes]
drivers/scsi/bfa/bfa_fcpim.c:465:1: warning: no previous prototype for 
‘bfa_ioim_profile_start’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/bfa/bfa_fcpim.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c
index d7385d1..604b4be 100644
--- a/drivers/scsi/bfa/bfa_fcpim.c
+++ b/drivers/scsi/bfa/bfa_fcpim.c
@@ -444,7 +444,7 @@ bfa_fcpim_port_iostats(struct bfa_s *bfa,
return BFA_STATUS_OK;
 }
 
-void
+static void
 bfa_ioim_profile_comp(struct bfa_ioim_s *ioim)
 {
struct bfa_itnim_latency_s *io_lat =
@@ -461,7 +461,7 @@ bfa_ioim_profile_comp(struct bfa_ioim_s *ioim)
io_lat->avg[idx] += val;
 }
 
-void
+static void
 bfa_ioim_profile_start(struct bfa_ioim_s *ioim)
 {
ioim->start_time = jiffies;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 08/55] scsi: Mark function as static in bfa/bfa_port.c

2014-03-29 Thread Rashika Kheria
Mark functions as static in bfa/bfa_port.c because they are not used
outside this file.

This eliminates the following warning in bfa/bfa_port.c:
drivers/scsi/bfa/bfa_port.c:776:1: warning: no previous prototype for 
‘bfa_cee_isr’ [-Wmissing-prototypes]
drivers/scsi/bfa/bfa_port.c:812:1: warning: no previous prototype for 
‘bfa_cee_notify’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
Reviewed-by: Josh Triplett 
---
 drivers/scsi/bfa/bfa_port.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_port.c b/drivers/scsi/bfa/bfa_port.c
index 8ea7697..3928a05 100644
--- a/drivers/scsi/bfa/bfa_port.c
+++ b/drivers/scsi/bfa/bfa_port.c
@@ -772,7 +772,7 @@ bfa_cee_reset_stats(struct bfa_cee_s *cee,
  * @return void
  */
 
-void
+static void
 bfa_cee_isr(void *cbarg, struct bfi_mbmsg_s *m)
 {
union bfi_cee_i2h_msg_u *msg;
@@ -808,7 +808,7 @@ bfa_cee_isr(void *cbarg, struct bfi_mbmsg_s *m)
  * @return void
  */
 
-void
+static void
 bfa_cee_notify(void *arg, enum bfa_ioc_event_e event)
 {
struct bfa_cee_s *cee = (struct bfa_cee_s *) arg;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


  1   2   3   4   5   >