Re: [PATCH 3.19 3/3] x86, mpx: Change the MPX enable/disable API to arch_prctl

2015-01-01 Thread Dave Hansen
On 12/29/2014 04:52 PM, Andy Lutomirski wrote:
> This has the benefit the it avoids cluttering prctl with more
> arch-specific functionality.  The down side is that arch_prctl will
> need to be wired up as a 32-bit syscall to add 32-bit support for
> MPX.

There is existing userspace out there which depends on the existing
prctl() setup.  There isn't a _lot_ and it might still be able to be
changed easily, but this isn't a given.

I'll check in with the folks doing the gcc (runtime) part of this next
week and see what they think.
--
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: WARNING: at drivers/gpu/drm/i915/intel_display.c:11375 [i915] in 3.19-rc2

2015-01-01 Thread Jani Nikula
On Thu, 01 Jan 2015, Andrey Skvortsov  wrote:
> Hi,
>
> this warning does not exist in 3.19-rc1, but it happens every boot in
> 3.19-rc2. If you need any other information or data, I would be glad
> to help to debug it.

Hmm, at a glance I can't find a commit that could be the culprit. Can
you bisect between rc1 and rc2 to find the bad commit?

Thanks,
Jani.



>
> [   12.848428] [ cut here ]
> [   12.848479] WARNING: CPU: 1 PID: 328 at 
> drivers/gpu/drm/i915/intel_display.c:11375 intel_crtc_set_config+0x3de/0xb36 
> [i915]()
> [   12.848482] WARN_ON(!set->fb && (set->num_connectors != 0))
> [   12.848484] Modules linked in: i915(E) drm_kms_helper(E) drm(E) 
> snd_hda_intel(E) snd_hda_controller(E) i2c_algo_bit(E) snd_hda_codec(E) 
> i2c_core(E) xhci_pci(E) xhci_hcd(E) ehci_pci(E) ehci_hcd(E) usbcore(E) 
> snd_hwdep(E) snd_pcm_oss(E) snd_mixer_oss(E) snd_pcm(E) snd_seq_midi(E) 
> snd_rawmidi(E) snd_seq_midi_event(E) snd_seq(E) snd_timer(E) 
> snd_seq_device(E) snd(E) video(E) battery(E) ppdev(E) parport_pc(E) 
> usb_common(E) serio_raw(E) lpc_ich(E) evdev(E) mfd_core(E) soundcore(E) 
> button(E) acpi_cpufreq(E) processor(E) coretemp(E) lp(E) parport(E) ext3(E) 
> jbd(E) mbcache(E) sd_mod(E) ata_generic(E) btrfs(E) ata_piix(E) pata_via(E) 
> libata(E) raid6_pq(E) thermal(E) scsi_mod(E) fan(E) thermal_sys(E) r8169(E) 
> mii(E) xor(E) zlib_deflate(E) crc32c_generic(E) libcrc32c(E)
> [   12.848531] CPU: 1 PID: 328 Comm: plymouthd Tainted: GE  
> 3.19.0-rc2-noiommu- #122
> [   12.848532] Hardware name: System manufacturer System Product Name/P8H67-M 
> PRO, BIOS 3904 04/27/2013
> [   12.848533]   a06b3002 813c01df 
> 8800378afcb8
> [   12.848535]  8103f24b  a06685d8 
> 88110880
> [   12.848537]  8800c83c2d00 8800c8ccb160 8800376c1000 
> 88011a74e000
> [   12.848539] Call Trace:
> [   12.848544]  [] ? dump_stack+0x4a/0x74
> [   12.848548]  [] ? warn_slowpath_common+0x9e/0xb7
> [   12.848566]  [] ? intel_crtc_set_config+0x3de/0xb36 
> [i915]
> [   12.848568]  [] ? warn_slowpath_fmt+0x4a/0x4f
> [   12.848584]  [] ? intel_crtc_set_config+0x3de/0xb36 
> [i915]
> [   12.848586]  [] ? __ww_mutex_lock+0x1c/0x91
> [   12.848598]  [] ? drm_mode_set_config_internal+0x53/0xd7 
> [drm]
> [   12.848604]  [] ? restore_fbdev_mode+0xae/0xca 
> [drm_kms_helper]
> [   12.848608]  [] ? 
> drm_fb_helper_restore_fbdev_mode_unlocked+0x24/0x5a [drm_kms_helper]
> [   12.848627]  [] ? intel_fbdev_restore_mode+0x1b/0x41 
> [i915]
> [   12.848632]  [] ? drm_lastclose+0x3c/0x104 [drm]
> [   12.848637]  [] ? drm_release+0x421/0x457 [drm]
> [   12.848639]  [] ? __fput+0xdb/0x177
> [   12.848642]  [] ? task_work_run+0x8e/0xa3
> [   12.848645]  [] ? do_notify_resume+0x64/0x7a
> [   12.848647]  [] ? int_signal+0x12/0x17
> [   12.848649] ---[ end trace da6972fb56a05968 ]---
>
> -- 
> Best regards,
> Andrey Skvortsov
>
> Secure e-mail with gnupg: See http://www.gnupg.org/
> PGP Key ID: 0x57A3AEAD
>
>

-- 
Jani Nikula, Intel Open Source Technology Center
--
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: [tpmdd-devel] Question about duplicate definitions of transmit_cmd in tpm-sysfs.c and tmp-interface.c

2015-01-01 Thread Jason Gunthorpe
On Sat, Dec 27, 2014 at 01:34:51AM -0500, nick wrote:

> After reading the code and trying various ways to merge these
> functions into tpm.h. I am wondering if the merge is really a good
> idea as it seems to break a lot of code that is very hard to trace
> and redo correctly without a lot of work. Further more I am curious
> as to why the merge is even useful as it seems unneeded to me other
> then to unify the function definitions which seems a minor detail to
> me.

Jarkko has already sent a patch to merge them, I think you can see the
to be merged patch here:

https://github.com/PeterHuewe/linux-tpmdd/commit/6e01df24a659c5f21d6beabf9b7a20a85f470cf4

If you see a problem with it please remark..

Jason
--
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] adjtimex: PPM scaling is by 2^-16

2015-01-01 Thread Richard Cochran
On Thu, Jan 01, 2015 at 08:41:20PM -0600, Jeff Epler wrote:
> Like Laurent Georget, I found by reading ntpd source
> the scale is 2^16 (i.e., 1 ~= 1.5e-5 ppm, 65536 = 1ppm)

Yep, you wont find this documented in prose anywhere, not even at
ntp.org.

> -long freq;/* Frequency offset, as scaled PPM
> +long freq;/* Frequency offset, in units of 2^-16 PPM
>   (parts per million) */

This wording is correct.

IMHO, it is more understandable when you explain that this field is a
fixed point number, with a 16 bit binary fraction. For example, see
the comment in the function, ppb_to_scaled_ppm(), in
Documentation/ptp/testptp.c.


Thanks,
Richard
--
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 0/3] mm: cma: /proc/cmainfo

2015-01-01 Thread Pavel Machek
On Mon 2014-12-29 11:36:39, Minchan Kim wrote:
> Hello,
> 
> On Fri, Dec 26, 2014 at 05:39:01PM +0300, Stefan I. Strogin wrote:
> > Hello all,
> > 
> > Here is a patch set that adds /proc/cmainfo.
> > 
> > When compiled with CONFIG_CMA_DEBUG /proc/cmainfo will contain information
> > about about total, used, maximum free contiguous chunk and all currently
> > allocated contiguous buffers in CMA regions. The information about allocated
> > CMA buffers includes pid, comm, allocation latency and stacktrace at the
> > moment of allocation.

We should not add new non-process related files in
/proc. So... NAK. Should this go to debugfs instead?

> It just says what you are doing but you didn't say why we need it.
> I can guess but clear description(ie, the problem what you want to
> solve with this patchset) would help others to review, for instance,
> why we need latency, why we need callstack, why we need new wheel
> rather than ftrace and so on.
> 
> Thanks.
> 
> > 
> > Example:
> > 
> > # cat /proc/cmainfo 
> > CMARegion stat:65536 kB total,  248 kB used,65216 kB max 
> > contiguous chunk


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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] [RFC] Deter exploit bruteforcing

2015-01-01 Thread Pavel Machek
On Tue 2014-12-30 10:40:15, Kees Cook wrote:
> On Wed, Dec 24, 2014 at 1:39 PM, Richard Weinberger  wrote:
> > While exploring the offset2lib attack I remembered that
> > grsecurity has an interesting feature to make such attacks
> > much harder. Exploits can brute stack canaries often very easily
> > if the target is a forking server like sshd or Apache httpd.
> > The problem is that after fork() the child has by definition
> > exactly the same memory as the parent and therefore also the same
> > stack canaries.
> > The attacker can guess the stack canaries byte by byte.
> > After 256 times 7 forks() a good exploit can find the correct
> > canary value.
> >
> > The basic idea behind this patch is to delay fork() if a child died
> > due to a fatal error.
> > Currently it delays fork() by 30 seconds if the parent tries to fork()
> > within 60 seconds after a child died due to a fatal error.
> >
> > I'm sure you'll hate this patch but I want to find out how much you hate it
> > and whether there is a little chance to get it mainline in a modified form.
> > Later I'd make it depend on a new Kconfig option and off by default
> > and the timing constants changeable via sysctl.

Does this break trinity, crashme, and similar programs?

Can you detect it died due to the stack canary? Then, the patch might
be actually acceptable.

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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] Revert "cfg80211: make WEXT compatibility unselectable"

2015-01-01 Thread Pavel Machek
On Wed 2014-12-31 08:49:00, Peter Hurley wrote:
> On 12/31/2014 08:26 AM, Grumbach, Emmanuel wrote:
> >>
> >> On Wed, 31 Dec 2014, Arend van Spriel wrote:
> >>
> >>> You mentioned in the discussion and I quote: "*If* wireless
> >>> maintainers think otherwise, I'll send a revert request to Linus for
> >>> consideration.". However, you did not wait for any response from the
> >>> wireless maintainers nor from the author of the patch you are reverting.
> >>> Seems like an overreaction to me though personally I do not disgree
> >>> with the revert itself.
> >>
> >> My understanding from the whole thread was that Emmanuel disagrees with
> >> the revert, and I consider Emmanuel to definitely belong to the "wireless
> >> maintainers" group. If my understanding was wrong on this, sorry for that.
> > 
> > You understanding is wrong. This patch has an author and you could I didn't
> > sign-off the patch which is an obvious indication I am not a "wireless 
> > maintainer".
> > You didn't even make the minimal effort to check how this patch should be 
> > properly
> > routed.
> > 
> > Regardless of all this, I didn't say I disagree, I said that we need to 
> > find a way to signal
> > the userland developers that an API will be deprecated at some point. I 
> > haven't seen
> > any response / suggestion from you on that.
> 
> pr_notice_once("WEXT compatibility has been deprecated since _" \
>" Upgrade your userspace tools to nl80211!\n");

Kernel interfaces are not being removed, not now, not ever. No need to
spam logs.

(And to the person who suggested WARN(): No.)

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/


[trivial PATCH] use capital BIOS in comment

2015-01-01 Thread Pavel Machek
Use capital BIOS in comment. Its cleaner, and allows diference
between BIOS and BIOs.

Signed-off-by: Pavel Machek 

diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 66dba36..452f904 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -582,7 +582,7 @@ void __init init_mem_mapping(void)
  *
  *
  * On x86, access has to be given to the first megabyte of ram because that 
area
- * contains bios code and data regions used by X and dosemu and similar apps.
+ * contains BIOS code and data regions used by X and dosemu and similar apps.
  * Access has to be given to non-kernel-ram areas as well, these contain the 
PCI
  * mmio resources as well as potential bios/acpi data regions.
  */

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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 v7 2/4] fpga manager: add sysfs interface document

2015-01-01 Thread Pavel Machek

> +What:/sys/class/fpga_manager//firmware
> +Date:October 2014
> +KernelVersion:   3.18
> +Contact: Alan Tull 
> +Description: Name of the FPGA image file to load using firmware class.

This is wrong interface, right? The only use of this string is to pass
it to udev. We should simply pass "fpga-0" as a firware name, and let
udev figure it out, no need to to prepare name in separate component,
then pass it to kernel, which passes it back to udev.

> +What:/sys/class/fpga_manager//reset
> +Date:October 2014
> +KernelVersion:   3.18
> +Contact: Alan Tull 
> +Description: Write 1 to reset the FPGA

Does 0 need to be written there to pull the fpga out of reset? Is this
a suitable interface?

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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] ARM: socfpga: dts: Add adxl34x

2015-01-01 Thread Pavel Machek
On Wed 2014-12-24 20:11:52, Walter Lozano wrote:
> This patch adds the DTS bindings for the adxl34x digital
> accelerometer.
> 
> Signed-off-by: Walter Lozano 

Acked-by: Pavel Machek 

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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 v7] edac: synps: Added EDAC support for zynq ddr ecc controller

2015-01-01 Thread Punnaiah Choudary Kalluri
Added EDAC support for reporting the ecc errors of synopsys ddr controller.
The ddr ecc controller corrects single bit errors and detects double bit
errors.

Signed-off-by: Punnaiah Choudary Kalluri 
---
Changes for v7:
- Fixed indentation and removed insignificant comments
- I have not taken care of spliting synps_edac_geterror_info function as
  it adds additional indentation levels and moreover the existing changes were
  made as part of the v2 review comments
Changes for v6:
- Fixed indentation and typo errors 
- Corrected the function and structure headers
Changes for v5:
- Removed dt binding info as already there is a binding info available
   under memorycontroller. so, updated ecc info there.
- corrected the ip version and function return types
Changes for v4:
- Shorten the macro definitions
- Corrected the ddr ip version
- Reverted the file name change
Changes for v3:
- Updated maintainer information
- Driver cleanup as per the review comments
- Shortened the prefix "sysnopsys" to "synps"
Changes for v2:
- Updated the commit header and message
- Renamed the filenames to synopsys_edac
- Corrected the compatilble string, commnets
- Renamed the macros,fucntions and data structures
---
 MAINTAINERS  |1 +
 drivers/edac/Kconfig |7 +
 drivers/edac/Makefile|1 +
 drivers/edac/synopsys_edac.c |  528 ++
 4 files changed, 537 insertions(+), 0 deletions(-)
 create mode 100644 drivers/edac/synopsys_edac.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 0ff630d..7601298 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1556,6 +1556,7 @@ N:xilinx
 F: drivers/clocksource/cadence_ttc_timer.c
 F: drivers/i2c/busses/i2c-cadence.c
 F: drivers/mmc/host/sdhci-of-arasan.c
+F: drivers/edac/synopsys_edac.c
 
 ARM SMMU DRIVER
 M: Will Deacon 
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index 7072c28..b7b6691 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -385,4 +385,11 @@ config EDAC_ALTERA_MC
  preloader must initialize the SDRAM before loading
  the kernel.
 
+config EDAC_SYNOPSYS
+   tristate "Synopsys DDR Memory Controller"
+   depends on EDAC_MM_EDAC && ARCH_ZYNQ
+   help
+ Support for error detection and correction on the Synopsys DDR
+ memory controller.
+
 endif # EDAC
diff --git a/drivers/edac/Makefile b/drivers/edac/Makefile
index 359aa49..9b5a095 100644
--- a/drivers/edac/Makefile
+++ b/drivers/edac/Makefile
@@ -67,3 +67,4 @@ obj-$(CONFIG_EDAC_OCTEON_LMC) += octeon_edac-lmc.o
 obj-$(CONFIG_EDAC_OCTEON_PCI)  += octeon_edac-pci.o
 
 obj-$(CONFIG_EDAC_ALTERA_MC)   += altera_edac.o
+obj-$(CONFIG_EDAC_SYNOPSYS)+= synopsys_edac.o
diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c
new file mode 100644
index 000..fa0e6fa
--- /dev/null
+++ b/drivers/edac/synopsys_edac.c
@@ -0,0 +1,528 @@
+/*
+ * Synopsys DDR ECC Driver
+ * This driver is based on ppc4xx_edac.c drivers
+ *
+ * Copyright (C) 2012 - 2014 Xilinx, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details
+ */
+
+#include 
+#include 
+#include 
+
+#include "edac_core.h"
+
+/* Number of cs_rows needed per memory controller */
+#define SYNPS_EDAC_NR_CSROWS   1
+
+/* Number of channels per memory controller */
+#define SYNPS_EDAC_NR_CHANS1
+
+/* Granularity of reported error in bytes */
+#define SYNPS_EDAC_ERR_GRAIN   1
+
+#define SYNPS_EDAC_MSG_SIZE256
+
+#define SYNPS_EDAC_MOD_STRING  "synps_edac"
+#define SYNPS_EDAC_MOD_VER "1"
+
+/* Synopsys DDR memory controller registers that are relevant to ECC */
+#define CTRL_OFST  0x0
+#define T_ZQ_OFST  0xA4
+
+/* ECC control register */
+#define ECC_CTRL_OFST  0xC4
+/* ECC log register */
+#define CE_LOG_OFST0xC8
+/* ECC address register */
+#define CE_ADDR_OFST   0xCC
+/* ECC data[31:0] register */
+#define CE_DATA_31_0_OFST  0xD0
+
+/* Uncorrectable error info registers */
+#define UE_LOG_OFST0xDC
+#define UE_ADDR_OFST   0xE0
+#define UE_DATA_31_0_OFST  0xE4
+
+#define STAT_OFST  0xF0
+#define SCRUB_OFST 0xF4
+
+/* Control register bit field definitions */
+#define CTRL_BW_MASK   0xC
+#define CTRL_BW_SHIFT  2
+
+#define D

Re: [PATCH] Documentation: Add entry for dell-laptop sysfs interface

2015-01-01 Thread Darren Hart
On Wed, Dec 31, 2014 at 12:20:59PM +0100, Gabriele Mazzotta wrote:
> On Tuesday 30 December 2014 21:31:49 Brian Norris wrote:
> > Hi,
> > 
> > On Wed, Dec 03, 2014 at 06:41:33PM +0100, Gabriele Mazzotta wrote:
> > > Add the documentation for the new sysfs interface of dell-laptop
> > > that allows to configure the keyboard illumination on Dell systems.
> > > 
> > > Signed-off-by: Gabriele Mazzotta 
> > > Signed-off-by: Pali Rohár 
> > > ---
> > >  .../ABI/testing/sysfs-platform-dell-laptop | 60 
> > > ++
> > >  1 file changed, 60 insertions(+)
> > >  create mode 100644 Documentation/ABI/testing/sysfs-platform-dell-laptop
> > > 
> > > diff --git a/Documentation/ABI/testing/sysfs-platform-dell-laptop 
> > > b/Documentation/ABI/testing/sysfs-platform-dell-laptop
> > > new file mode 100644
> > > index 000..7969443
> > > --- /dev/null
> > > +++ b/Documentation/ABI/testing/sysfs-platform-dell-laptop
> > > @@ -0,0 +1,60 @@
> > > +What:/sys/class/leds/dell::kbd_backlight/als_setting
> > > +Date:December 2014
> > > +KernelVersion:   3.19
> > > +Contact: Gabriele Mazzotta ,
> > > + Pali Rohár 
> > > +Description:
> > > + This file allows to control the automatic keyboard
> > > + illumination mode on some systems that have an ambient
> > > + light sensor. Write 1 to this file to enable the auto
> > > + mode, 0 to disable it.
> > [...]
> > 
> > This entry appears wrong, or at least incomplete. My system boots with a
> > default value of 18, and the 'set' implementation accepts any value from
> > 0 to 255.
> > 
> > According to the comments in dell-laptop.c, the value actually means
> > something different than on/off:
> > 
> >   cbArg3, byte0  Desired setting of ALS value that turns the light on or 
> > off.
> > 
> > Admittedly, I'm not clear on what the intended interface is, as I've
> > never had the ALS / keyboard backlight controls all working properly on
> > my laptop in the first place, but I thought this would be the right
> > place to ask about getting the documentation and driver in sync.
> 
> Hi,
> 
> You are perfectly right, the documentation is wrong and I'm sorry for
> that. als_setting should allow you to define when the keyboard
> backlight has to be turned on or off depending on the value reported
> by the ambient light sensor.
> 
> Please note that not everything that is in libsmbios [1] is implemented
> in the kernel driver. Take a look at it, recently there have been few
> changes related to the ALS settings. Probably they are not needed given
> that you are able to set the threshold with the current kernel driver,
> but you might find something interesting.
> 
> I'll submit a patch to correct the documentation, thanks for reporting.

Thanks Gabriele, let's make sure to get this into this rc cycle, sooner the
better.

Thanks,

-- 
Darren Hart
Intel Open Source Technology Center
--
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 0/2] x86: Add IMR support to Quark/Galileo

2015-01-01 Thread Darren Hart
On Mon, Dec 29, 2014 at 05:23:01PM +, Bryan O'Donoghue wrote:
> This patchset adds an IMR driver to the kernel plus platform code for
> Intel Galileo Gen1/Gen2 boards.

I will be taking a closer look at this on Monday the 5th when I return from
vacation.

-- 
Darren Hart
Intel Open Source Technology Center
--
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] Revert "cfg80211: make WEXT compatibility unselectable"

2015-01-01 Thread Lennart Sorensen
On Thu, Jan 01, 2015 at 12:14:15PM -0800, Linus Torvalds wrote:
> So I'm not saying "ifconfig is wonderful". It's not.
> 
> But I *am* saying that "changing user interfaces and then expecting
> people to change is f*cking stupid".
> 
> The fact is, ifconfig is simple for the simple cases, but more
> importantly, a lot of people learnt how to use it. Saying "you should
> all change, because we made up a new syntax" is not good policy.

Perhaps it would be good to at least fix the buggy bits of ifconfig and
perhaps make it work with netlink instead of parsing /proc.  Maybe not
add features, but at least fix the broken bits and make it use modern
interfaces.  The interface to the user can stay.  And of course if it
happens to encounter a really old kernel, it should still remember how
to speak to it with the old interface.

> The people who did "ip" could have fairly easily have done a wrapper
> around the same code that also left the old "ifconfig" syntax. Then,
> distros could have trivially just dropped the old "ifconfig" package,
> and entirely replaced it with the new "ip" package.

Hmm, that might be a better idea.

> As it is, we have two different models, and they'll basically stay
> around forever.
> 
> For something like ifconfig, very few people care. But *all* the same
> arguments are true wrt "iw" and "iwconfig".
> 
> The people who are trying to deprecate the WEXT interfaces should put
> the blame firmly where it belongs - on the people who thought that
> "we'll just ignore all old history".
> 
> Because people who think that "we'll just redesign everything" are
> actually f*cking morons. Really.
> 
> There's a real reason the kernel has the "no regression" policy. And
> that reason is that I'm not a moron.
> 
> History matter. Legacy uses matter.

Sounds good to me.

-- 
Len Sorensen
--
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] crypto: Remove unnecessary KERN_ERR in bfin_crc.c

2015-01-01 Thread Masanari Iida
This patch removes unnecessary KERN_ERR from bfin_crypto_crc_mod_init().

Signed-off-by: Masanari Iida 
---
 drivers/crypto/bfin_crc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/bfin_crc.c b/drivers/crypto/bfin_crc.c
index 9ae149b..33cf9eb 100644
--- a/drivers/crypto/bfin_crc.c
+++ b/drivers/crypto/bfin_crc.c
@@ -744,7 +744,7 @@ static int __init bfin_crypto_crc_mod_init(void)
 
ret = platform_driver_register(&bfin_crypto_crc_driver);
if (ret) {
-   pr_info(KERN_ERR "unable to register driver\n");
+   pr_err("unable to register driver\n");
return ret;
}
 
-- 
2.2.1.62.g3f15098

--
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] adjtimex: PPM scaling is by 2^-16

2015-01-01 Thread Jeff Epler
Signed-off-by: Jeff Epler 
---
Like Laurent Georget, I found by reading ntpd source
the scale is 2^16 (i.e., 1 ~= 1.5e-5 ppm, 65536 = 1ppm)

Perhaps a wording like the following is suitable.

 man2/adjtimex.2 | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/man2/adjtimex.2 b/man2/adjtimex.2
index 4b558b7..118908a 100644
--- a/man2/adjtimex.2
+++ b/man2/adjtimex.2
@@ -54,9 +54,8 @@ struct timex {
 long offset;  /* Time offset; nanoseconds, if STA_NANO
  status flag is set, otherwise
  microseconds */
-long freq;/* Frequency offset, as scaled PPM
+long freq;/* Frequency offset, in units of 2^-16 PPM
  (parts per million) */
-.\" FIXME What is the scaling unit of timex.freq?  2^16 ?
 long maxerror;/* Maximum error (microseconds) */
 long esterror;/* Estimated error (microseconds) */
 int  status;  /* Clock command/status */
@@ -72,13 +71,13 @@ struct timex {
  flag is set, otherwise microseconds */
 long tick;/* Microseconds between clock ticks */
 long ppsfreq; /* PPS (pulse per second) frequency
- (scaled PPM, read-only) */
+ (2^-16 PPM, read-only) */
 long jitter;  /* PPS jitter (read-only); nanoseconds, if
  STA_NANO status flag is set, otherwise
  microseconds */
 int  shift;   /* PPS interval duration
  (seconds, read-only) */
-long stabil;  /* PPS stability (scaled PPM, read-only) */
+long stabil;  /* PPS stability (2^-16 PPM, read-only) */
 long jitcnt;  /* PPS jitter limit exceeded (read-only) */
 long calcnt;  /* PPS calibration intervals (read-only) */
 long errcnt;  /* PPS calibration errors (read-only) */
-- 
2.1.4
--
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: mm: Fix typo in vm.txt

2015-01-01 Thread Masanari Iida
This patch fix a spelling typo in Documentation/sysctl/vm.txt

Signed-off-by: Masanari Iida 
---
 Documentation/sysctl/vm.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 4415aa9..de3afef 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -728,7 +728,7 @@ The default value is 60.
 
 - user_reserve_kbytes
 
-When overcommit_memory is set to 2, "never overommit" mode, reserve
+When overcommit_memory is set to 2, "never overcommit" mode, reserve
 min(3% of current process size, user_reserve_kbytes) of free memory.
 This is intended to prevent a user from starting a single memory hogging
 process, such that they cannot recover (kill the hog).
-- 
2.2.1.62.g3f15098

--
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 3/3] X86: Add a thread cpu time implementation to vDSO

2015-01-01 Thread Shaohua Li
On Fri, Dec 19, 2014 at 06:03:34PM +0100, Peter Zijlstra wrote:
> On Fri, Dec 19, 2014 at 08:48:07AM -0800, Andy Lutomirski wrote:
> > On Fri, Dec 19, 2014 at 3:23 AM, Peter Zijlstra  
> > wrote:
> > > On Thu, Dec 18, 2014 at 04:22:59PM -0800, Andy Lutomirski wrote:
> > >> Bad news: this patch is incorrect, I think.  Take a look at
> > >> update_rq_clock -- it does fancy things involving irq time and
> > >> paravirt steal time.  So this patch could result in extremely
> > >> non-monotonic results.
> > >
> > > Yeah, I'm not sure how (and if) we could make all that work :/
> > 
> > I obviously can't comment on what Facebook needs, but if I were
> > rigging something up to profile my own code*, I'd want a count of
> > elapsed time, including user, system, and probably interrupt as well.
> > I would probably not want to count time during which I'm not
> > scheduled, and I would also probably not want to count steal time.
> > The latter makes any implementation kind of nasty.
> > 
> > The API presumably doesn't need to be any particular clock id for
> > clock_gettime, and it may not even need to be clock_gettime at all.
> > 
> > Is perf self-monitoring good enough for this?  If not, can we make it
> > good enough?
> 
> Yeah, I think you should be able to use that. You could count a NOP
> event and simply use its activated time. We have PERF_COUNT_SW_DUMMY for
> such purposes iirc.
> 
> The advantage of using perf self profiling is that it (obviously)
> extends to more than just walltime.

Hi Peter & Andy,
I'm wondering how we could use the perf to implament a clock_gettime.
reading the perf fd or using ioctl is slow so reading the mmap
ringbuffer is the only option. But as far as I know the ringbuffer has
data only when an event is generated. Between two events, there is
nothing we can read from the ringbuffer. Then how can application get
time info in the interval?

Thanks,
Shaohua
--
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] microblaze: Add missing PVR version codes

2015-01-01 Thread Erico Nunes
PVR version code was missing in the cpu_ver_lookup table for the following
versions: 8.50.b 8.50.c 9.2 9.3

This caused /proc/cpuinfo to display "CPU-Ver: Unknown" for these versions.

This was detected and the patch tested with MicroBlaze version 8.50.c.
The other codes were taken from the Xilinx MicroBlaze Processor Reference
Guides UG081 (v14.7) and UG984 (v2014.1).

Signed-off-by: Erico Nunes 
---
 arch/microblaze/kernel/cpu/cpuinfo.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c 
b/arch/microblaze/kernel/cpu/cpuinfo.c
index 234acad..b60442d 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo.c
@@ -41,8 +41,12 @@ const struct cpu_ver_key cpu_ver_lookup[] = {
{"8.40.a", 0x18},
{"8.40.b", 0x19},
{"8.50.a", 0x1a},
+   {"8.50.b", 0x1c},
+   {"8.50.c", 0x1e},
{"9.0", 0x1b},
{"9.1", 0x1d},
+   {"9.2", 0x1f},
+   {"9.3", 0x20},
{NULL, 0},
 };
 
-- 
2.2.1

--
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 v3 0/5] block: loop: convert to blk-mq

2015-01-01 Thread Sedat Dilek
On Fri, Jan 2, 2015 at 3:22 AM, Ming Lei  wrote:
> On Thu, Jan 1, 2015 at 11:14 PM, Sedat Dilek  wrote:
>> On Thu, Jan 1, 2015 at 1:29 AM, Ming Lei  wrote:
>> [...]
 How did you test with fio (your fio lines)?
>>>
>>> Your fio command line is basically same with my fio config, and you
>>> can attach one image to loop via:  losetup -f file_name. Looks your
>>> randread result is good, and I can observe ~80 IOPS vs. ~200 IOPS
>>> on my slow HDD. in the randread test too.
>>>
>>> #fio config##
>>> [global]
>>> direct=1
>>> size=128G
>>> bsrange=4k-4k
>>> timeout=30
>>> numjobs=1
>>> ioengine=libaio
>>> iodepth=64
>>> filename=/dev/loop0
>>> group_reporting=1
>>>
>>> [f]
>>> rw=${RW}
>>>
>>
>> Thanks for your fio config-file.
>>
>> When a 1GiB is created on my ext4-system, the IOPS raised up from 515 to 981.
>>
>> # egrep 'iops=|Laying out IO file' fio-test*next20141231-1-loopmq-small*
>> fio-test1-3.19.0-rc2-next20141231-1-loopmq-small.txt:  read :
>> io=1024.0MB, bw=2063.4KB/s, iops=515 , runt=508182msec
>> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt:randread: Laying
>> out IO file(s) (1 file(s) / 1024MB)
>> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt:  read :
>> io=1024.0MB, bw=3924.3KB/s, iops=981 , runt=267206msec
>>
>> I made some more testing with next-20141231 plus block-loop-mq-v3 and
>> block.git#for-linus on top (see attached full patch).
>
> I will submit v4 after block.git#for-linus is merged for avoiding
> the conflict, and blk_mq_freeze_queue() still need to be
> exported.
>
>>
>> This increases IOPS from 981 up to 2103.
>
> Looks there isn't fancy patch for performance boost in block.git#for-linus,
> I am wondering it may be caused by page cache, and before each test,
> I always drop cache via 'echo 3 > /proc/sys/vm/drop_caches' for avoiding
> the effect.
>

OK, good to know.
I played a bit with the --size option, below 1GiB I get some fantastic results.
But I will retest with dropped-caches.

>>
>> # egrep 'iops=|Laying out IO file'
>> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt
>> fio-test2-3.19.0-rc2-next20141231-3-loopmq-small.txt
>> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt:randread: Laying
>> out IO file(s) (1 file(s) / 1024MB)
>> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt:  read :
>> io=1024.0MB, bw=3924.3KB/s, iops=981 , runt=267206msec
>> fio-test2-3.19.0-rc2-next20141231-3-loopmq-small.txt:randread: Laying
>> out IO file(s) (1 file(s) / 1024MB)
>> fio-test2-3.19.0-rc2-next20141231-3-loopmq-small.txt:  read :
>> io=1024.0MB, bw=8414.9KB/s, iops=2103 , runt=124611msec
>>
>> If you like you can have a closer look at the fio benchmark results,
>
> Anyway both us can observe big improvement on randread about
> the patch.
>
>> I also have added two patches which made it easy for me to cope with
>> the merge conflicts within block/loop stuff.
>
> Thanks for your report on this conflict.
>

BTW, I played also with plain block-linus and your patchset on top
against a vanilla Linux v3.19-rc2.

v4 much appreciated.

Feel free to add my Tested-by.

- Sedat -
--
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 v3 0/5] block: loop: convert to blk-mq

2015-01-01 Thread Ming Lei
On Thu, Jan 1, 2015 at 11:14 PM, Sedat Dilek  wrote:
> On Thu, Jan 1, 2015 at 1:29 AM, Ming Lei  wrote:
> [...]
>>> How did you test with fio (your fio lines)?
>>
>> Your fio command line is basically same with my fio config, and you
>> can attach one image to loop via:  losetup -f file_name. Looks your
>> randread result is good, and I can observe ~80 IOPS vs. ~200 IOPS
>> on my slow HDD. in the randread test too.
>>
>> #fio config##
>> [global]
>> direct=1
>> size=128G
>> bsrange=4k-4k
>> timeout=30
>> numjobs=1
>> ioengine=libaio
>> iodepth=64
>> filename=/dev/loop0
>> group_reporting=1
>>
>> [f]
>> rw=${RW}
>>
>
> Thanks for your fio config-file.
>
> When a 1GiB is created on my ext4-system, the IOPS raised up from 515 to 981.
>
> # egrep 'iops=|Laying out IO file' fio-test*next20141231-1-loopmq-small*
> fio-test1-3.19.0-rc2-next20141231-1-loopmq-small.txt:  read :
> io=1024.0MB, bw=2063.4KB/s, iops=515 , runt=508182msec
> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt:randread: Laying
> out IO file(s) (1 file(s) / 1024MB)
> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt:  read :
> io=1024.0MB, bw=3924.3KB/s, iops=981 , runt=267206msec
>
> I made some more testing with next-20141231 plus block-loop-mq-v3 and
> block.git#for-linus on top (see attached full patch).

I will submit v4 after block.git#for-linus is merged for avoiding
the conflict, and blk_mq_freeze_queue() still need to be
exported.

>
> This increases IOPS from 981 up to 2103.

Looks there isn't fancy patch for performance boost in block.git#for-linus,
I am wondering it may be caused by page cache, and before each test,
I always drop cache via 'echo 3 > /proc/sys/vm/drop_caches' for avoiding
the effect.

>
> # egrep 'iops=|Laying out IO file'
> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt
> fio-test2-3.19.0-rc2-next20141231-3-loopmq-small.txt
> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt:randread: Laying
> out IO file(s) (1 file(s) / 1024MB)
> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt:  read :
> io=1024.0MB, bw=3924.3KB/s, iops=981 , runt=267206msec
> fio-test2-3.19.0-rc2-next20141231-3-loopmq-small.txt:randread: Laying
> out IO file(s) (1 file(s) / 1024MB)
> fio-test2-3.19.0-rc2-next20141231-3-loopmq-small.txt:  read :
> io=1024.0MB, bw=8414.9KB/s, iops=2103 , runt=124611msec
>
> If you like you can have a closer look at the fio benchmark results,

Anyway both us can observe big improvement on randread about
the patch.

> I also have added two patches which made it easy for me to cope with
> the merge conflicts within block/loop stuff.

Thanks for your report on this conflict.

Thanks,
Ming Lei
--
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 0/2] x86: Add IMR support to Quark/Galileo

2015-01-01 Thread Darren Hart
On Wed, Dec 31, 2014 at 12:12:58PM +0200, Andy Shevchenko wrote:
> On Mon, Dec 29, 2014 at 7:23 PM, Bryan O'Donoghue
>  wrote:
> > This patchset adds an IMR driver to the kernel plus platform code for
> > Intel Galileo Gen1/Gen2 boards.
> 
> []
> 
> > Bryan O'Donoghue (2):
> >   x86: Add Isolated Memory Regions for Quark X1000
> >   platform/x86 Add Intel Galileo platform specific setup
> 
> I'm going to review this soon, but here few comments below.

Thanks for your review Andy, good advice throughout.

> 
> >  arch/x86/Kconfig |  23 ++
> >  arch/x86/include/asm/imr.h   |  79 ++
> >  arch/x86/include/asm/intel-quark.h   |  31 ++
> 
> Could it be just a quark.h? Like for ce4100.
> Those intel- prefixes in the modules looks awkward especially when
> pathname consists x86 already.
> 
> >  arch/x86/kernel/Makefile |   1 +
> >  arch/x86/kernel/imr.c| 529 
> > +++
> >  drivers/platform/x86/Kconfig |  15 +
> >  drivers/platform/x86/Makefile|   1 +
> >  drivers/platform/x86/intel_galileo.c | 175 
> 
> Here what about to make an hierarchy like:
> intel/galileo.c
> intel/mid/... would be those modules with intel_mid_ prefixes in
> future. See my proposal regarding to drivers/mfd [1]

As Bryan is only adding one file to the platform/drivers/x86, let's skip the
reorg as part of this patch series. We can consider that separately if someone
wants to make the argument that the time has come to add another directory
layer.

-- 
Darren Hart
Intel Open Source Technology Center
--
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 v3 0/6] support GMAC driver for RK3288

2015-01-01 Thread David Miller
From: Heiko Stübner 
Date: Thu, 01 Jan 2015 03:06:31 +0100

> Hi David,
> 
> Am Mittwoch, 31. Dezember 2014, 19:15:38 schrieb David Miller:
>> From: Roger Chen 
>> Date: Mon, 29 Dec 2014 17:42:32 +0800
>> 
>> > Roger Chen (6):
>> >   patch1: add driver for Rockchip RK3288 SoCs integrated GMAC
>> >   patch2: define clock ID used for GMAC
>> >   patch3: modify CRU config for Rockchip RK3288 SoCs integrated GMAC
>> >   patch4: dts: rockchip: add gmac info for rk3288
>> >   patch5: dts: rockchip: enable gmac on RK3288 evb board
>> >   patch6: add document for Rockchip RK3288 GMAC
>> > 
>> > Tested on rk3288 evb board:
>> > Execute the following command to enable ethernet,
>> > set local IP and ping a remote host.
>> > 
>> > busybox ifconfig eth0 up
>> > busybox ifconfig eth0 192.168.1.111
>> > ping 192.168.1.1
>> 
>> Series applied to net-next, thanks.
> 
> could we split this up a bit instead?

Too late, what's in my tree is in the permanent commit history
and cannot be deleted.
--
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] PCI/sysfs: off by two and memory corruption in driver_override parameter

2015-01-01 Thread Sasha Levin
There are two different issues fixed here:

 - On nun-NULL terminated input a random byte of memory would get flipped
from '\n' to '\0'.
 - When printing the driver_override parameter when it is 4095 and 4094 bytes
long the printing code would access invalid memory.

Signed-off-by: Sasha Levin 
---
 drivers/pci/pci-sysfs.c |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index aa012fb..be6b2b1 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -521,17 +521,17 @@ static ssize_t driver_override_store(struct device *dev,
struct pci_dev *pdev = to_pci_dev(dev);
char *driver_override, *old = pdev->driver_override, *cp;
 
-   if (count > PATH_MAX)
+   /* We need to keep extra room for a newline */
+   if (count >= (PATH_MAX - 1))
return -EINVAL;
 
driver_override = kstrndup(buf, count, GFP_KERNEL);
if (!driver_override)
return -ENOMEM;
 
-   cp = strchr(driver_override, '\n');
-   if (cp)
-   *cp = '\0';
-
+   driver_override[count] = '\0';
+   if (driver_override[count - 1] == '\n')
+   driver_override[count - 1] = 0;
if (strlen(driver_override)) {
pdev->driver_override = driver_override;
} else {
-- 
1.7.10.4

--
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: apparent loss of continuity in kernel .config?

2015-01-01 Thread Gene Heskett
On Thursday 01 January 2015, rh_ wrote:
>On Wed, 31 Dec 2014 09:16:57 -0500
>
>Gene Heskett  wrote:
>> Greetings;
>> 
>> Usually, when I build a new kernel, just placing a copy of an older
>> versions .config in the unpacked src directory is sufficient that
>> only what has been changed has to be answered during a make
>> oldconfig, perhaps a couple dozen new features need to be answered
>> yes or no, and I have a .config that will usually build me a bootable
>> kernel.  Not any more.
>> 
>> Since my 3.16.0 has been suffering from stalls of up to 2 or 3
>> minutes while both htop and gkrellm continue to report that there is
>> nothing hogging the machine, in a general description that matches
>> the Dave Jone saga, but w/o the log spew, probably because I don't
>> have extreme debugging enabled.
>> 
>> But its strange in how it manifests itself as it will do it from a
>> fresh boot, and I get aggravated and reboot, and it doesn't do it
>> till the next reboot which may be a month later.  Almost an alternate
>> boot phenomenon.
>> Attempting to go from 3.16.0 to 3.16.7 last night, a make oldconfig
>> started from scratch as if there were no .config's in the directory.
>> I stood on the enter key to take the defaults, then ran a make
>> xconfig to discover it was totally wrong for an AMD phenom, no
>> networking, no disc drivers, video was an old ATI, when there is an
>> nvidia card in it, yadda, yadda.
>> 
>> I went thru this exercise 4 times, as I keep a gzipped copy on the
>> config that built the kernel version in the boot directory with my
>> build script. And every time it was the same story.
>> 
>> Obviously I can't, at 80 yo, remember every item in a 28k .config
>> file from build to build, so what am I doing wrong that is destroying
>> this continuity?
>> 
>> Thanks everybody.
>
>Have you had any replies?  I do similar but I may be less patient
>than you. I keep dragging around my previous .config and when it
>no longer works I just stay with the kernel that's working. And try
>again later. It's been interesting to see what new things default
>to "yes" along the way.
>
>I would not call it "loss of continuity", I would call it loss of
>backward compatibility. If the kernel breaks userspace it causes
>a shitstorm but if the kernel breaks the kernel buildspace you're
>supposed to suck it up and make a new .config from scratch.

IMO that is NOT how its supposed to work.  So I guess I'll waste a tree 
and print a working  3.16.0 & use that to build a new one. I do not 
believe it even makes an attempt to read the old one, but simply goes 
wandering in the vineyard, making frequent stops to recycle the barrel 
sampling.

>> "There are four boxes to be used in defense of liberty:
>>  soap, ballot, jury, and ammo. Please use in that order."
>> 
>> -Ed Howdershelt (Author)
>> Genes Web page 
>> US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
>
>Since voting machines,SCOTUS and juries have been compromised it
>seems we're down to that last box.

Indeed, but it no doubt will take quite a few boxes.  The funny thing lots 
of people find hard to believe is that Ed wrote that in about 1940.  His 
long view obviously started before mine as mine didn't start will late in 
'34.  It took me till the middle 60's to decide its broken.  And every 
libtard fix breaks it worse...


Thanks & lets hope 2015 is a better year.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
--
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] ACPI / PM: Fix PM initialization for devices that are not present

2015-01-01 Thread Rafael J. Wysocki
From: Rafael J. Wysocki 

If an ACPI device object whose _STA returns 0 (not present and not
functional) has _PR0 or _PS0, its power_manageable flag will be set
and acpi_bus_init_power() will return 0 for it.  Consequently, if
such a device object is passed to the ACPI device PM functions, they
will attempt to carry out the requested operation on the device,
although they should not do that for devices that are not present.

To fix that problem make acpi_bus_init_power() return an error code
for devices that are not present which will cause power_manageable to
be cleared for them as appropriate in acpi_bus_get_power_flags().
However, the lists of power resources should not be freed for the
device in that case, so modify acpi_bus_get_power_flags() to keep
those lists even if acpi_bus_init_power() returns an error.
Accordingly, when deciding whether or not the lists of power
resources need to be freed, acpi_free_power_resources_lists()
should check the power.flags.power_resources flag instead of
flags.power_manageable, so make that change too.

Furthermore, if acpi_bus_attach() sees that flags.initialized is
unset for the given device, it should reset the power management
settings of the device and re-initialize them from scratch instead
of relying on the previous settings (the device may have appeared
after being not present previously, for example), so make it use
the 'valid' flag of the D0 power state as the initial value of
flags.power_manageable for it and call acpi_bus_init_power() to
discover its current power state.

Signed-off-by: Rafael J. Wysocki 
---

"Stable" material.

---
 drivers/acpi/device_pm.c |2 +-
 drivers/acpi/scan.c  |   13 -
 2 files changed, 9 insertions(+), 6 deletions(-)

Index: linux-pm/drivers/acpi/device_pm.c
===
--- linux-pm.orig/drivers/acpi/device_pm.c
+++ linux-pm/drivers/acpi/device_pm.c
@@ -257,7 +257,7 @@ int acpi_bus_init_power(struct acpi_devi
 
device->power.state = ACPI_STATE_UNKNOWN;
if (!acpi_device_is_present(device))
-   return 0;
+   return -ENXIO;
 
result = acpi_device_get_power(device, &state);
if (result)
Index: linux-pm/drivers/acpi/scan.c
===
--- linux-pm.orig/drivers/acpi/scan.c
+++ linux-pm/drivers/acpi/scan.c
@@ -1001,7 +1001,7 @@ static void acpi_free_power_resources_li
if (device->wakeup.flags.valid)
acpi_power_resources_list_free(&device->wakeup.resources);
 
-   if (!device->flags.power_manageable)
+   if (!device->power.flags.power_resources)
return;
 
for (i = ACPI_STATE_D0; i <= ACPI_STATE_D3_HOT; i++) {
@@ -1744,10 +1744,8 @@ static void acpi_bus_get_power_flags(str
device->power.flags.power_resources)
device->power.states[ACPI_STATE_D3_COLD].flags.os_accessible = 
1;
 
-   if (acpi_bus_init_power(device)) {
-   acpi_free_power_resources_lists(device);
+   if (acpi_bus_init_power(device))
device->flags.power_manageable = 0;
-   }
 }
 
 static void acpi_bus_get_flags(struct acpi_device *device)
@@ -2371,13 +2369,18 @@ static void acpi_bus_attach(struct acpi_
/* Skip devices that are not present. */
if (!acpi_device_is_present(device)) {
device->flags.visited = false;
+   device->flags.power_manageable = 0;
return;
}
if (device->handler)
goto ok;
 
if (!device->flags.initialized) {
-   acpi_bus_update_power(device, NULL);
+   device->flags.power_manageable =
+   device->power.states[ACPI_STATE_D0].flags.valid;
+   if (acpi_bus_init_power(device))
+   device->flags.power_manageable = 0;
+
device->flags.initialized = true;
}
device->flags.visited = false;

--
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] can: kvaser_usb: Don't free packets when tight on URBs

2015-01-01 Thread Stephen Hemminger
On Tue, 23 Dec 2014 17:46:54 +0200
"Ahmed S. Darwish"  wrote:

>   int ret = NETDEV_TX_OK;
> + bool kfree_skb_on_error = true;
>  
>   if (can_dropped_invalid_skb(netdev, skb))
>   return NETDEV_TX_OK;
> @@ -1336,6 +1337,7 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff 
> *skb,
>  
>   if (!context) {
>   netdev_warn(netdev, "cannot find free context\n");
> + kfree_skb_on_error = false;
>   ret =  NETDEV_TX_BUSY;

You already have a flag value (ret == NETDEV_TX_BUSY), why
not use that instead of introducing another variable?
--
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: [GIT PULL 0/3] perf/urgent fixes and improvements

2015-01-01 Thread Ingo Molnar

* Arnaldo Carvalho de Melo  wrote:

> Hi Ingo,
> 
>   Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit ac931f87a647ca156f65a4c00e7297165e4fa2d8:
> 
>   perf: Fix building warning on ARM 32 (2014-12-19 13:09:43 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git 
> tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to 82aa019e0098a1e0801df94345c0297448323126:
> 
>   perf callchain: Append callchains only when requested (2014-12-23 12:06:39 
> -0300)
> 
> 
> perf/urgent fixes and improvements:
> 
> User visible:
> 
> - Show progress bar in more places while doing histogram processing
>   in the hists browser (Namhyung Kim)
> 
> - Print backtrace symbols when segfault occurs in 'report' (Namhyung Kim)
> 
> Infrastructure:
> 
> - Append callchains only when requested (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo 
> 
> 
> Namhyung Kim (3):
>   perf report: Show progress bar for output resorting
>   perf ui/tui: Print backtrace symbols when segfault occurs
>   perf callchain: Append callchains only when requested
> 
>  tools/perf/builtin-annotate.c |  2 +-
>  tools/perf/builtin-diff.c |  2 +-
>  tools/perf/builtin-report.c   | 24 ++--
>  tools/perf/builtin-top.c  |  4 ++--
>  tools/perf/tests/hists_cumulate.c |  2 +-
>  tools/perf/tests/hists_filter.c   |  2 +-
>  tools/perf/tests/hists_output.c   | 10 +-
>  tools/perf/ui/tui/setup.c | 26 --
>  tools/perf/util/hist.c| 17 +
>  tools/perf/util/hist.h|  2 +-
>  10 files changed, 71 insertions(+), 20 deletions(-)

Pulled into tip:perf/urgent, thanks a lot Arnaldo!

Ingo
--
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/


[tip:perf/urgent] perf ui/tui: Print backtrace symbols when segfault occurs

2015-01-01 Thread tip-bot for Namhyung Kim
Commit-ID:  b11bc8e28f4829f693ef6c0178fe1811386ac828
Gitweb: http://git.kernel.org/tip/b11bc8e28f4829f693ef6c0178fe1811386ac828
Author: Namhyung Kim 
AuthorDate: Mon, 22 Dec 2014 13:44:11 +0900
Committer:  Arnaldo Carvalho de Melo 
CommitDate: Tue, 23 Dec 2014 12:05:59 -0300

perf ui/tui: Print backtrace symbols when segfault occurs

The output will look like below.  (I added an error into ui__init() for
the test).

  $ perf report
  perf: Segmentation fault
   backtrace 
  perf[0x503781]
  /usr/lib/libc.so.6(+0x33b20)[0x7f1a14f04b20]
  perf(ui__init+0xd5)[0x503645]
  perf(setup_browser+0x97)[0x4ce4e7]
  perf(cmd_report+0xcea)[0x4392ba]
  perf[0x428493]
  perf(main+0x60a)[0x427c0a]
  /usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7f1a14ef1040]
  perf[0x427d29]
  [0x0]

Signed-off-by: Namhyung Kim 
Cc: Adrian Hunter 
Cc: David Ahern 
Cc: Ingo Molnar 
Cc: Jiri Olsa 
Cc: Peter Zijlstra 
Cc: Stephane Eranian 
Link: 
http://lkml.kernel.org/r/1419223455-4362-4-git-send-email-namhy...@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo 
---
 tools/perf/ui/tui/setup.c | 26 --
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c
index 2f61256..3c38f25 100644
--- a/tools/perf/ui/tui/setup.c
+++ b/tools/perf/ui/tui/setup.c
@@ -1,5 +1,8 @@
 #include 
 #include 
+#ifdef HAVE_BACKTRACE_SUPPORT
+#include 
+#endif
 
 #include "../../util/cache.h"
 #include "../../util/debug.h"
@@ -88,6 +91,25 @@ int ui__getch(int delay_secs)
return SLkp_getkey();
 }
 
+#ifdef HAVE_BACKTRACE_SUPPORT
+static void ui__signal_backtrace(int sig)
+{
+   void *stackdump[32];
+   size_t size;
+
+   ui__exit(false);
+   psignal(sig, "perf");
+
+   printf(" backtrace \n");
+   size = backtrace(stackdump, ARRAY_SIZE(stackdump));
+   backtrace_symbols_fd(stackdump, size, STDOUT_FILENO);
+
+   exit(0);
+}
+#else
+# define ui__signal_backtrace  ui__signal
+#endif
+
 static void ui__signal(int sig)
 {
ui__exit(false);
@@ -122,8 +144,8 @@ int ui__init(void)
ui_browser__init();
tui_progress__init();
 
-   signal(SIGSEGV, ui__signal);
-   signal(SIGFPE, ui__signal);
+   signal(SIGSEGV, ui__signal_backtrace);
+   signal(SIGFPE, ui__signal_backtrace);
signal(SIGINT, ui__signal);
signal(SIGQUIT, ui__signal);
signal(SIGTERM, ui__signal);
--
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: [GIT PULL] One more vdso fix for 3.19

2015-01-01 Thread Ingo Molnar

* Andy Lutomirski  wrote:

> Hi Ingo et al,
> 
> Please consider pulling for x86/urgent.
> 
> Thanks,
> Andy
> 
> 
> The following changes since commit 394f56fe480140877304d342dec46d50dc823d46:
> 
>   x86_64, vdso: Fix the vdso address randomization algorithm
> (2014-12-20 16:56:57 -0800)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
> tags/pr-20141223-x86-vdso
> 
> for you to fetch changes up to 1ddf0b1b11aa8a90cef6706e935fc31c75c406ba:
> 
>   x86, vdso: Use asm volatile in __getcpu (2014-12-23 13:05:30 -0800)
> 
> 
> This is hopefully the last vdso fix for 3.19.  It should be very
> safe (it just adds a volatile).
> 
> I don't think it fixes an actual bug (the __getcpu calls in the
> pvclock code may not have been needed in the first place), but
> discussion on that point is ongoing.
> 
> It also fixes a big performance issue in 3.18 and earlier in which
> the lsl instructions in vclock_gettime got hoisted so far up the
> function that they happened even when the function they were in was
> never called.  n 3.19, the performance issue seems to be gone due to
> the whims of my compiler and some interaction with a branch that's
> now gone.
> 
> I'll hopefully have a much bigger overhaul of the pvclock code
> for 3.20, but it needs careful review.
> 
> 
> Andy Lutomirski (1):
>   x86, vdso: Use asm volatile in __getcpu
> 
>  arch/x86/include/asm/vgtod.h | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)

Pulled into tip:x86/urgent, thanks Andy!

I've attached the full commit below - I'm not sure it was sent to 
lkml.

Thanks,

Ingo

>
>From 1ddf0b1b11aa8a90cef6706e935fc31c75c406ba Mon Sep 17 00:00:00 2001
From: Andy Lutomirski 
Date: Sun, 21 Dec 2014 08:57:46 -0800
Subject: [PATCH] x86, vdso: Use asm volatile in __getcpu

In Linux 3.18 and below, GCC hoists the lsl instructions in the
pvclock code all the way to the beginning of __vdso_clock_gettime,
slowing the non-paravirt case significantly.  For unknown reasons,
presumably related to the removal of a branch, the performance issue
is gone as of

e76b027e6408 x86,vdso: Use LSL unconditionally for vgetcpu

but I don't trust GCC enough to expect the problem to stay fixed.

There should be no correctness issue, because the __getcpu calls in
__vdso_vlock_gettime were never necessary in the first place.

Note to stable maintainers: In 3.18 and below, depending on
configuration, gcc 4.9.2 generates code like this:

 9c3:   44 0f 03 e8 lsl%ax,%r13d
 9c7:   45 89 ebmov%r13d,%r11d
 9ca:   0f 03 d8lsl%ax,%ebx

This patch won't apply as is to any released kernel, but I'll send a
trivial backported version if needed.

Fixes: 51c19b4f5927 x86: vdso: pvclock gettime support
Cc: sta...@vger.kernel.org # 3.8+
Cc: Marcelo Tosatti 
Acked-by: Paolo Bonzini 
Signed-off-by: Andy Lutomirski 
---
 arch/x86/include/asm/vgtod.h | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h
index e7e9682a33e9..f556c4843aa1 100644
--- a/arch/x86/include/asm/vgtod.h
+++ b/arch/x86/include/asm/vgtod.h
@@ -80,9 +80,11 @@ static inline unsigned int __getcpu(void)
 
/*
 * Load per CPU data from GDT.  LSL is faster than RDTSCP and
-* works on all CPUs.
+* works on all CPUs.  This is volatile so that it orders
+* correctly wrt barrier() and to keep gcc from cleverly
+* hoisting it out of the calling function.
 */
-   asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG));
+   asm volatile ("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG));
 
return p;
 }
--
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/


[tip:perf/urgent] perf callchain: Append callchains only when requested

2015-01-01 Thread tip-bot for Namhyung Kim
Commit-ID:  82aa019e0098a1e0801df94345c0297448323126
Gitweb: http://git.kernel.org/tip/82aa019e0098a1e0801df94345c0297448323126
Author: Namhyung Kim 
AuthorDate: Mon, 22 Dec 2014 13:44:14 +0900
Committer:  Arnaldo Carvalho de Melo 
CommitDate: Tue, 23 Dec 2014 12:06:39 -0300

perf callchain: Append callchains only when requested

The perf report --children can be called with callchain disabled so no
need to append callchains.  Actually the root of callchain tree is not
initialized properly in this case.

Signed-off-by: Namhyung Kim 
Cc: Adrian Hunter 
Cc: David Ahern 
Cc: Ingo Molnar 
Cc: Jiri Olsa 
Cc: Peter Zijlstra 
Cc: Stephane Eranian 
Link: 
http://lkml.kernel.org/r/1419223455-4362-7-git-send-email-namhy...@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo 
---
 tools/perf/util/hist.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 1cc6ea4..0ced178 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -304,7 +304,7 @@ static struct hist_entry *hist_entry__new(struct hist_entry 
*template,
size_t callchain_size = 0;
struct hist_entry *he;
 
-   if (symbol_conf.use_callchain || symbol_conf.cumulate_callchain)
+   if (symbol_conf.use_callchain)
callchain_size = sizeof(struct callchain_root);
 
he = zalloc(sizeof(*he) + callchain_size);
@@ -737,7 +737,7 @@ iter_add_single_cumulative_entry(struct hist_entry_iter 
*iter,
iter->he = he;
he_cache[iter->curr++] = he;
 
-   callchain_append(he->callchain, &callchain_cursor, sample->period);
+   hist_entry__append_callchain(he, sample);
 
/*
 * We need to re-initialize the cursor since callchain_append()
@@ -810,7 +810,8 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter,
iter->he = he;
he_cache[iter->curr++] = he;
 
-   callchain_append(he->callchain, &cursor, sample->period);
+   if (symbol_conf.use_callchain)
+   callchain_append(he->callchain, &cursor, sample->period);
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/


[tip:perf/urgent] perf report: Show progress bar for output resorting

2015-01-01 Thread tip-bot for Namhyung Kim
Commit-ID:  740b97f9509ac5a015278940747178af4eb0900d
Gitweb: http://git.kernel.org/tip/740b97f9509ac5a015278940747178af4eb0900d
Author: Namhyung Kim 
AuthorDate: Mon, 22 Dec 2014 13:44:10 +0900
Committer:  Arnaldo Carvalho de Melo 
CommitDate: Tue, 23 Dec 2014 12:01:37 -0300

perf report: Show progress bar for output resorting

Sometimes it takes a long time to resort hist entries for output in case
of a large data file.  Show a progress bar window and inform user.

Signed-off-by: Namhyung Kim 
Cc: Adrian Hunter 
Cc: David Ahern 
Cc: Ingo Molnar 
Cc: Jiri Olsa 
Cc: Peter Zijlstra 
Cc: Stephane Eranian 
Link: 
http://lkml.kernel.org/r/1419223455-4362-3-git-send-email-namhy...@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo 
---
 tools/perf/builtin-annotate.c |  2 +-
 tools/perf/builtin-diff.c |  2 +-
 tools/perf/builtin-report.c   | 24 ++--
 tools/perf/builtin-top.c  |  4 ++--
 tools/perf/tests/hists_cumulate.c |  2 +-
 tools/perf/tests/hists_filter.c   |  2 +-
 tools/perf/tests/hists_output.c   | 10 +-
 tools/perf/util/hist.c| 10 +-
 tools/perf/util/hist.h|  2 +-
 9 files changed, 43 insertions(+), 15 deletions(-)

diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index e7417fe..747f861 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -232,7 +232,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
if (nr_samples > 0) {
total_nr_samples += nr_samples;
hists__collapse_resort(hists, NULL);
-   hists__output_resort(hists);
+   hists__output_resort(hists, NULL);
 
if (symbol_conf.event_group &&
!perf_evsel__is_group_leader(pos))
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 1ce425d..303c1e1 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -605,7 +605,7 @@ static void hists__process(struct hists *hists)
hists__precompute(hists);
hists__compute_resort(hists);
} else {
-   hists__output_resort(hists);
+   hists__output_resort(hists, NULL);
}
 
hists__fprintf(hists, true, 0, 0, 0, stdout);
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 3936760..072ae8a 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -457,6 +457,19 @@ static void report__collapse_hists(struct report *rep)
ui_progress__finish();
 }
 
+static void report__output_resort(struct report *rep)
+{
+   struct ui_progress prog;
+   struct perf_evsel *pos;
+
+   ui_progress__init(&prog, rep->nr_entries, "Sorting events for 
output...");
+
+   evlist__for_each(rep->session->evlist, pos)
+   hists__output_resort(evsel__hists(pos), &prog);
+
+   ui_progress__finish();
+}
+
 static int __cmd_report(struct report *rep)
 {
int ret;
@@ -505,13 +518,20 @@ static int __cmd_report(struct report *rep)
if (session_done())
return 0;
 
+   /*
+* recalculate number of entries after collapsing since it
+* might be changed during the collapse phase.
+*/
+   rep->nr_entries = 0;
+   evlist__for_each(session->evlist, pos)
+   rep->nr_entries += evsel__hists(pos)->nr_entries;
+
if (rep->nr_entries == 0) {
ui__error("The %s file has no samples!\n", file->path);
return 0;
}
 
-   evlist__for_each(session->evlist, pos)
-   hists__output_resort(evsel__hists(pos));
+   report__output_resort(rep);
 
return report__browse_hists(rep);
 }
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 0aa7747..961cea1 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -285,7 +285,7 @@ static void perf_top__print_sym_table(struct perf_top *top)
}
 
hists__collapse_resort(hists, NULL);
-   hists__output_resort(hists);
+   hists__output_resort(hists, NULL);
 
hists__output_recalc_col_len(hists, top->print_entries - printed);
putchar('\n');
@@ -554,7 +554,7 @@ static void perf_top__sort_new_samples(void *arg)
}
 
hists__collapse_resort(hists, NULL);
-   hists__output_resort(hists);
+   hists__output_resort(hists, NULL);
 }
 
 static void *display_thread_tui(void *arg)
diff --git a/tools/perf/tests/hists_cumulate.c 
b/tools/perf/tests/hists_cumulate.c
index 614d5c4..4b8226e 100644
--- a/tools/perf/tests/hists_cumulate.c
+++ b/tools/perf/tests/hists_cumulate.c
@@ -187,7 +187,7 @@ static int do_test(struct hists *hists, struct result 
*expected, size_t nr_expec
 * function since TEST_ASSERT_VAL() returns in case of failure.
 */
hists__collapse_resort(hists, NULL);
-   hists__output_resort

libaio tarballs on

2015-01-01 Thread Sedat Dilek
[ CC libaio Debian/Ubuntu maintainer ]

Hi Jeff,

I am playing with fio (manually compiled v2.2.3) and wanted to update
also my libaio development package on Ubuntu/precise.

Both dsc (description) files of Debian and Ubuntu libaio source
packages v0.3.110 [1,2] point to a URL on  [3].
This space is empty.

Google told me about [4].

My question: Where does someone get official libaio tarballs?

Thanks in advance.

Regards,
- Sedat -

[0.1] http://brick.kernel.dk/snaps/fio-2.2.3.tar.bz2
[0.2] http://git.kernel.org/cgit/linux/kernel/git/axboe/fio.git/tree/README#n101
[1] http://ftp.de.debian.org/debian/pool/main/liba/libaio/libaio_0.3.110-1.dsc
[2] http://archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio_0.3.110-1.dsc
[3] https://www.kernel.org/pub/linux/libs/aio/
[4] https://git.fedorahosted.org/cgit/libaio.git/
--
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: iio: dht11 Updates

2015-01-01 Thread harald
Hi!

On Thu, 01 Jan 2015 12:38:23 +, Jonathan Cameron 
wrote:
> On 02/12/14 23:32, Richard Weinberger wrote:
>> Please see my current patches for your driver.
>> As discussed in an earlier mail I'm testing with the DHT22 sensor only.
>> With the IRQ changes I see 84 edges.
>> 
>> 
>> [PATCH 1/4] iio: dht11: Add locking
>> [PATCH 2/4] iio: dht11: IRQ fixes
>> [PATCH 3/4] iio: dht11: Logging updates
>> [PATCH 4/4] iio: dht11: Fix out-of-bounds read
>> 
 
> I've lost track of where we are with this patch series.
> Does this cause trouble on any of the parts supported?

Yes, 2/4 needs an update. 

1/4 is fine by me, however it was noted that there is already
locking in the iio core for the in-kernel interface but not
for the sysfs interface. I think we need locking in the case of
the sysfs interace as well, but the final decision is yours...

4/4 is obviously right.

3/4 is cleanup. I'd rather defer this to later and do it right,
because right now this patch is cosmetic and doesn't get rid of
the deeper issues. I'll start to work on a cleanup series once
the fixes are merged.

Richard, what's your timeframe to send an updated series?
I can send an update if you don't have time.

HTH,
Harald
--
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] drivers:isdn: Remove uneeded fix me comment in capi.c for the function,decode_ie

2015-01-01 Thread Tilman Schmidt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Nicholas,

Am 31.12.2014 um 20:21 schrieb Nicholas Krause:
> Removes a no longer needed fix me comment for the
> function,decode_ie in the file, capi.c. This comment is no longer
> needed as the commit this was written in was 2009 when the new
> driver,three was introduced. Due to no breakage related to the 
> newer version of this driver we can safely remove this comment.

I won't oppose removal of that comment. However your commit message is
not quite to the point.

The comment poses the question of whether the conversion to upper case
done by the toupper() calls in the two lines following is actually
necessary. The fact that there is no breakage with the current code
does not answer that question. It could only be answered by *removing*
the toupper() calls and *then* checking for breakage.

However the cost of two toupper() calls seems so small that it's
hardly worth the effort and risk and we should just leave them in.

Regards,
Tilman

> diff --git a/drivers/isdn/gigaset/capi.c
> b/drivers/isdn/gigaset/capi.c index ccec777..d55ba3f 100644 ---
> a/drivers/isdn/gigaset/capi.c +++ b/drivers/isdn/gigaset/capi.c @@
> -182,7 +182,6 @@ static void decode_ie(u8 *in, char *out) { int i =
> *in; while (i-- > 0) { -  /* ToDo: conversion to upper case
> necessary? */ *out++ = toupper(hex_asc_hi(*++in)); *out++ =
> toupper(hex_asc_lo(*in)); }
> 

- -- 
Tilman Schmidt  E-Mail: til...@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQEcBAEBAgAGBQJUpbm7AAoJEFPuqx0v+F+qxFcH/1F6l/1ycTikNdwfsHesZW6Q
TXDO7YfguLDe+wyePEvHdBFW+AwEgGFWTz2EEqfpdu/dHwmWjZh8yTLkJEMfn4fz
jBDm2Kyw+uFzUSXPVCyMUNXgC7yATs6l2AEkX5FSr0BycUVyMIeemChB4Pf5DfQD
B1Lz86xKhM3HpdI/KIDXqqHK88mT/B+7+rUL6lyJ6GRU/168EetD5PzjXoQ67DUw
JaSpCTjf1nUQAL1Nw623QVT4le/vPXLhwpIIAhLmvwO3nn8XWx4WdiCGVm6bGgrV
coWwo8LRB/IMCwoZGh2RhmDy2nOYwj1k9NYLjrx+izhbQUSpwqoLUCZe6vhBTks=
=Ppmw
-END PGP SIGNATURE-
--
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/


Disappearing RFC3041 IPv6 privacy addresses

2015-01-01 Thread Chris Adams
Starting (I believe) with kernel 3.17, I am seeing RFC3041 IPv6 privacy
addresses disappear while they are still in use.  I have been seeing
open SSH connections drop, and have finally seen one "dead" but not yet
closed.  At that point "ss -t" shows an ESTAB socket with a local
address that is no longer listed by "ip -6 addr list br1".

This is on a Fedora 20 system, currently running the Fedora
3.17.7-200.fc20.x86_64 kernel.  I don't know if it matters, but my
network setup is a router running OpenWRT and just IPv6 RAs and SLAAC
(DHCPv6 disabled).
-- 
Chris Adams 
--
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 3/7] iio: Add support for DA9150 GPADC

2015-01-01 Thread Hartmut Knaack
Adam Thomson schrieb am 22.12.2014 um 17:51:
> This patch adds support for DA9150 Charger & Fuel-Gauge IC GPADC.
> 
> Signed-off-by: Adam Thomson 
Reviewed-by: Hartmut Knaack 
> ---
>  drivers/iio/adc/Kconfig|   9 +
>  drivers/iio/adc/Makefile   |   1 +
>  drivers/iio/adc/da9150-gpadc.c | 409 
> +
>  3 files changed, 419 insertions(+)
>  create mode 100644 drivers/iio/adc/da9150-gpadc.c
> 
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index 0f79e47..6e00b81 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -135,6 +135,15 @@ config AXP288_ADC
> device. Depending on platform configuration, this general purpose ADC 
> can
> be used for sampling sensors such as thermal resistors.
> 
> +config DA9150_GPADC
> + tristate "Dialog DA9150 GPADC driver support"
> + depends on MFD_DA9150
> + help
> +   Say yes here to build support for Dialog DA9150 GPADC.
> +
> +   This driver can also be built as a module. If chosen, the module name
> +   will be da9150-gpadc.
> +
>  config EXYNOS_ADC
>   tristate "Exynos ADC driver support"
>   depends on ARCH_EXYNOS || ARCH_S3C24XX || ARCH_S3C64XX || (OF && 
> COMPILE_TEST)
> diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile
> index 701fdb7..d56ee9b 100644
> --- a/drivers/iio/adc/Makefile
> +++ b/drivers/iio/adc/Makefile
> @@ -15,6 +15,7 @@ obj-$(CONFIG_AD7887) += ad7887.o
>  obj-$(CONFIG_AD799X) += ad799x.o
>  obj-$(CONFIG_AT91_ADC) += at91_adc.o
>  obj-$(CONFIG_AXP288_ADC) += axp288_adc.o
> +obj-$(CONFIG_DA9150_GPADC) += da9150-gpadc.o
>  obj-$(CONFIG_EXYNOS_ADC) += exynos_adc.o
>  obj-$(CONFIG_LP8788_ADC) += lp8788_adc.o
>  obj-$(CONFIG_MAX1027) += max1027.o
> diff --git a/drivers/iio/adc/da9150-gpadc.c b/drivers/iio/adc/da9150-gpadc.c
> new file mode 100644
> index 000..3f7bc81
> --- /dev/null
> +++ b/drivers/iio/adc/da9150-gpadc.c
> @@ -0,0 +1,409 @@
> +/*
> + * DA9150 GPADC Driver
> + *
> + * Copyright (c) 2014 Dialog Semiconductor
> + *
> + * Author: Adam Thomson 
> + *
> + * This program is free software; you can redistribute  it and/or modify it
> + * under  the terms of  the GNU General  Public License as published by the
> + * Free Software Foundation;  either version 2 of the  License, or (at your
> + * option) any later version.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +/* Channels */
> +enum da9150_gpadc_hw_channel {
> + DA9150_GPADC_HW_CHAN_GPIOA_2V = 0,
> + DA9150_GPADC_HW_CHAN_GPIOA_2V_,
> + DA9150_GPADC_HW_CHAN_GPIOB_2V,
> + DA9150_GPADC_HW_CHAN_GPIOB_2V_,
> + DA9150_GPADC_HW_CHAN_GPIOC_2V,
> + DA9150_GPADC_HW_CHAN_GPIOC_2V_,
> + DA9150_GPADC_HW_CHAN_GPIOD_2V,
> + DA9150_GPADC_HW_CHAN_GPIOD_2V_,
> + DA9150_GPADC_HW_CHAN_IBUS_SENSE,
> + DA9150_GPADC_HW_CHAN_IBUS_SENSE_,
> + DA9150_GPADC_HW_CHAN_VBUS_DIV,
> + DA9150_GPADC_HW_CHAN_VBUS_DIV_,
> + DA9150_GPADC_HW_CHAN_ID,
> + DA9150_GPADC_HW_CHAN_ID_,
> + DA9150_GPADC_HW_CHAN_VSYS,
> + DA9150_GPADC_HW_CHAN_VSYS_,
> + DA9150_GPADC_HW_CHAN_GPIOA_6V,
> + DA9150_GPADC_HW_CHAN_GPIOA_6V_,
> + DA9150_GPADC_HW_CHAN_GPIOB_6V,
> + DA9150_GPADC_HW_CHAN_GPIOB_6V_,
> + DA9150_GPADC_HW_CHAN_GPIOC_6V,
> + DA9150_GPADC_HW_CHAN_GPIOC_6V_,
> + DA9150_GPADC_HW_CHAN_GPIOD_6V,
> + DA9150_GPADC_HW_CHAN_GPIOD_6V_,
> + DA9150_GPADC_HW_CHAN_VBAT,
> + DA9150_GPADC_HW_CHAN_VBAT_,
> + DA9150_GPADC_HW_CHAN_TBAT,
> + DA9150_GPADC_HW_CHAN_TBAT_,
> + DA9150_GPADC_HW_CHAN_TJUNC_CORE,
> + DA9150_GPADC_HW_CHAN_TJUNC_CORE_,
> + DA9150_GPADC_HW_CHAN_TJUNC_OVP,
> + DA9150_GPADC_HW_CHAN_TJUNC_OVP_,
> +};
> +
> +enum da9150_gpadc_channel {
> + DA9150_GPADC_CHAN_GPIOA = 0,
> + DA9150_GPADC_CHAN_GPIOB,
> + DA9150_GPADC_CHAN_GPIOC,
> + DA9150_GPADC_CHAN_GPIOD,
> + DA9150_GPADC_CHAN_IBUS,
> + DA9150_GPADC_CHAN_VBUS,
> + DA9150_GPADC_CHAN_ID,
> + DA9150_GPADC_CHAN_VSYS,
> + DA9150_GPADC_CHAN_VBAT,
> + DA9150_GPADC_CHAN_TBAT,
> + DA9150_GPADC_CHAN_TJUNC_CORE,
> + DA9150_GPADC_CHAN_TJUNC_OVP,
> +};
> +
> +/* Private data */
> +struct da9150_gpadc {
> + struct da9150 *da9150;
> + struct device *dev;
> +
> + struct mutex lock;
> + struct completion complete;
> +};
> +
> +
> +static irqreturn_t da9150_gpadc_irq(int irq, void *data)
> +{
> +
> + struct da9150_gpadc *gpadc = data;
> +
> + complete(&gpadc->complete);
> +
> + return IRQ_HANDLED;
> +}
> +
> +static int da9150_gpadc_read_adc(struct da9150_gpadc *gpadc, int hw_chan)
> +{
> + u8 result_regs[2];
> + int result;
> +
> + mutex_lock(&gpadc->lock);
> +
> + /* Set channel & enable measurement */
> + da9150_reg_write(gpadc->da9150, DA9150_GPADC_MAN,
> +  (DA9150_GPADC_EN_MASK |
> +  

Re: Bisected regression from 3.17 still present in 3.19-rc1

2015-01-01 Thread Andreas Mohr
Matthew Garrett wrote:
> There's your problem. The Darwin call results in the firmware exposing
> the battery via SBS, not as an ACPI control method battery. Enable
> CONFIG_ACPI_SBS and you should be good.

Hmm, do I smell a possible usability case here?
Two choices:
a) declare a non-CONFIG_ACPI_SBS kernel
   to be a "broken/inconsistent configuration"
   (e.g. when used with a "Darwin" personality)
   which thus will "simply not work"
   (--> limitation is "by design"),
   thus simply give up
b) declare CONFIG_ACPI_SBS to be cleanly optional/dynamic,
   and then in case missing CONFIG_ACPI_SBS happens to be requested
   try to give hints that it is missing

a) may easily be fully acceptable, but if b) is deemed better,
then perhaps there are ways
(such as failing calls --> generate log error message, ...)
to nicely determine/diagnose/report this issue.

Andreas Mohr
--
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] Removed unused variable i from sound/soc/soc-pcm.c Signed-off-by: Shakil A Khan

2015-01-01 Thread Shakil A Khan
---
 sound/soc/soc-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index d6e8d6b..6b0136e 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -304,7 +304,7 @@ static bool soc_pcm_has_symmetry(struct snd_pcm_substream 
*substream)
 static void soc_pcm_set_msb(struct snd_pcm_substream *substream, int bits)
 {
struct snd_soc_pcm_runtime *rtd = substream->private_data;
-   int ret, i;
+   int ret;
 
if (!bits)
return;
-- 
1.9.1

--
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 WON!!

2015-01-01 Thread POSTCODESLOTERIJ.NL



We are please to inform you of our new year promotion award program held
1st January 2015,which have pronounce your email-address as the lucky
winner of a total sum:of €250,000.
CONTACT:
The claim office/Email:postc...@luckymail.com,with your winning
Serial-No:LE0031#11250PSNL.
__  __  __  __  __
Postcodesloterij.nl

WARNING!!
This winning notification is expected to be read and/or used only by the
individual(s) for whom it is intended.If you have received this electronic
communication in error, please reply to the sender advising of the error
in transmission and delete the original message FOR SECURITY REASON := =
== = == = = =

--
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] Revert "cfg80211: make WEXT compatibility unselectable"

2015-01-01 Thread Linus Torvalds
On Thu, Jan 1, 2015 at 11:44 AM, Lennart Sorensen
 wrote:
>
> ifconfig seems to just be broken for many cases of perfectly nice features
> in the kernel.

So I'm not saying "ifconfig is wonderful". It's not.

But I *am* saying that "changing user interfaces and then expecting
people to change is f*cking stupid".

The fact is, ifconfig is simple for the simple cases, but more
importantly, a lot of people learnt how to use it. Saying "you should
all change, because we made up a new syntax" is not good policy.

The people who did "ip" could have fairly easily have done a wrapper
around the same code that also left the old "ifconfig" syntax. Then,
distros could have trivially just dropped the old "ifconfig" package,
and entirely replaced it with the new "ip" package.

As it is, we have two different models, and they'll basically stay
around forever.

For something like ifconfig, very few people care. But *all* the same
arguments are true wrt "iw" and "iwconfig".

The people who are trying to deprecate the WEXT interfaces should put
the blame firmly where it belongs - on the people who thought that
"we'll just ignore all old history".

Because people who think that "we'll just redesign everything" are
actually f*cking morons. Really.

There's a real reason the kernel has the "no regression" policy. And
that reason is that I'm not a moron.

History matter. Legacy uses matter.

  Linus
--
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 18/18] Documentation: ACPI for ARM64

2015-01-01 Thread Graeme Gregory
On Wed, Dec 31, 2014 at 04:34:46PM +0800, Hanjun Guo wrote:
> On 2014年12月31日 04:13, ashw...@codeaurora.org wrote:
> >Hi Hanjun,
> >
> >Overall the document looks good to us. Some minor clarifications below.
> >
> >>-- Forwarded message --
> >>From: Graeme Gregory 
> >>
> >>Add documentation for the guidelines of how to use ACPI
> >>on ARM64.
> >>
> >>Signed-off-by: Graeme Gregory 
> >>Signed-off-by: Al Stone 
> >>Signed-off-by: Hanjun Guo 
> >>---
> >>  Documentation/arm64/arm-acpi.txt |  323
> >>++
> >>  1 file changed, 323 insertions(+)
> >>  create mode 100644 Documentation/arm64/arm-acpi.txt
> >>
> >
> >[..]
> >
> >>+Relationship with Device Tree
> >>+-
> >
> >[..]
> >
> >>+When booting using ACPI tables, the /chosen node in DT will still be
> >>parsed
> >>+to extract the kernel command line and initrd path.  No other section of
> >>the
> >>+DT will be used.
> >
> >Is this still true?
> 
> No, we can booting the ACPI system in EFI stub without dtb. Catalin
> also pointed out this issue, I will remove this paragraph.
> 

The paragraph is still correct, the /chosen node is always present even
if nothing else is.

Graeme

--
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 1/2] x86: Add Isolated Memory Regions for Quark X1000

2015-01-01 Thread Bryan O'Donoghue
On 31/12/14 15:05, Andy Shevchenko wrote:


>> +int imr_del(int reg, unsigned long base, unsigned long size);
>
> Same comments as for add_range.
> Could it be imr_remove_range() ?

Can be. You've actually caught me out there, function name is "imr_del"
function description says imr_del_range(). Amazing to think I proof read
this file a number of times for exactly thing type of thing

I'm happy with

imr_add_range();
imr_remove_range();

>> +
>> +#endif /* _IMR_H */
>> diff --git a/arch/x86/include/asm/intel-quark.h
b/arch/x86/include/asm/intel-quark.h
>> new file mode 100644
>> index 000..f51ac8c
>> --- /dev/null
>> +++ b/arch/x86/include/asm/intel-quark.h



>> +#ifdef CONFIG_X86_32
>> +static inline int cpu_is_quark(const struct cpuinfo_x86 *c)
>> +{
>> +   return (c->x86_vendor == X86_VENDOR_INTEL &&
>> +   c->x86 == 5 && c->x86_model == 9);
>> +}
>> +#else
>> +static inline int cpu_is_quark(const struct cpuinfo_x86 *c)
>> +{
>> +   return 0;
>> +}
>> +#endif
>> +
>> +#endif /* _ASM_X86_INTEL_QUARK_H */
>
> Could we use x86_match_cpu() instead?

I don't see why not. I'll kill this header and call out to
x86_match_cpu() in the Galileo and IMR code.

>> +   ret = iosf_mbi_read(QRK_MBI_UNIT_MM, QRK_MBI_MM_READ,
>> +   reg, &imr->addr_lo);
>> +   if (ret)
>> +   return ret;
>> +
>> +   ret = iosf_mbi_read(QRK_MBI_UNIT_MM, QRK_MBI_MM_READ,
>> +   ++reg, &imr->addr_hi);
>
> Could you use reg++ in previous line and so on?

Yes I could. Originally wrote the code with a pre-increment and then
changed the flow later on. Post-increment will work just as good now and
is more readable.

> One more idea, if you make a union inside the structure you may do
> this in a loop.
> struct imr {
>  union {
>   struct imr {
>  ...
>   };
>   u32 regs[IMR_NUM_REGS];
>  };
> }
> Mostly same for _write().

Since reg is incrementing on each iosf_mbi_dothing() that can work.

>> +   u32 reg = imr_dev.reg_base + (imr_id * IMR_NUM_REGS);
>> +   u32 reg_lock = reg;
>
> Do we need a separate variable? Would (reg - IMR_NUM_REGS) work for you?

Sure. A separate integer isn't required, I can make that change.

>> +done:
>> +   local_irq_restore(flags);
>
> Could you do like
>
>   local_irq_restore(flags);
>   return 0;
> done:
>   local_irq_restore(flags);
>   WARN(...)
>  return ret;
> ?

Doesn't change the logic so yeah, works for me.

>> +static int imr_dbgfs_state_show(struct seq_file *s, void *unused)
>> +{
>> +   int i, ret = -ENODEV;
>> +   struct imr imr;
>> +   u32 size;
>> +
>> +   mutex_lock(&imr_dev.lock);
>
> It seems you may get the imr_dev via parameters. I suggest to avoid
> using global variables as much as possible.

Appreciated, you're right globals are bad.

I think in this case the mutex at that scope is necessary though. Same
with the debugfs handle.

>> +
>> +   for (i = 0; i <= imr_dev.num; i++) {
>
> num is not num, but last one? Sounds confusing for me.

Will change.

>> +
>> +   f = debugfs_create_file("state", S_IFREG | S_IRUGO,
>> +   dir, imr_dev, &imr_state_ops);
>> +   if (!f)
>> +   goto err;
>
> Are you planing to extend the debugfs contents? Would it be okay to
> use only one file for now?

No not planning to extend.
OK with the one file.

>> +}
>
> No need to put this function under ifdef  - debugfs has the stubs.

Ah - wasn't aware of that.
Great stuff - I'll kill the ifdefs - thanks !

> Can you define pr_fmt() ?
>
> 1 KiB.

Yep will do
:g/pr_info/s//pr_fmt/g

>
>> +   base, size);
>> +   dump_stack();
>
> dump_stack is really needed here? In that case why not to use WARN()?

Hmm - I nope - dump_stack() isn't relevant since it's an in-kernel API.
Did an unthinking copy/past from the mtrr code

I'll zap that.

>> +   if (imr_check_range(base, size))
>> +   return -EINVAL;
>
> ret = imr_();
> if (ret)
>  return ret;

Good catch.

>> +   for (i = 0; i <= imr_dev.num; i++) {
>> +   ret = imr_read(i, &imr);
>> +   if (ret)
>> +   goto done;
>> +
>> +   /* Find overlap */
>> +   if (imr_enabled(&imr)) {
>> +   if (base >= imr_to_phys(imr.addr_lo) &&
>> +   base <= imr_to_phys(imr.addr_hi)) {
>
>> +   overlap = 1;
>> +   break;
>
> Maybe
> ret = -EINVAL;
> goto done;

Agree - I like that change.
Waste of time to complete the loop if an overlap is detected.


>> +   if (reg >= 0) {
>> +   ret = imr_read(reg, &imr);
>> +   if (ret)
>> +   goto done;
>> +
>> +   if (!imr_enabled(&imr) || imr.addr_lo & IMR_LOCK) {
>> +   ret = -ENODEV;
>> +   goto done;
>> +   }
>> +  

Re: [PATCH] gpu: drm: gma500: mmu.c: Remove unused function

2015-01-01 Thread Patrik Jakobsson
On Thu, Jan 1, 2015 at 5:55 PM, Rickard Strandqvist
 wrote:
> Remove the function psb_get_default_pd_addr() that is not used anywhere.
>
> This was partially found by using a static code analysis program called 
> cppcheck.
>
> Signed-off-by: Rickard Strandqvist 

Hej Rickard

I'd like to keep that function since it's relevant to getting the MSVDX running.
I'm not working on it but someone else might be.

> ---
>  drivers/gpu/drm/gma500/mmu.c |9 -
>  1 file changed, 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/mmu.c b/drivers/gpu/drm/gma500/mmu.c
> index 0eaf11c..557cae7 100644
> --- a/drivers/gpu/drm/gma500/mmu.c
> +++ b/drivers/gpu/drm/gma500/mmu.c
> @@ -426,15 +426,6 @@ struct psb_mmu_pd *psb_mmu_get_default_pd(struct 
> psb_mmu_driver *driver)
> return pd;
>  }
>
> -/* Returns the physical address of the PD shared by sgx/msvdx */
> -uint32_t psb_get_default_pd_addr(struct psb_mmu_driver *driver)
> -{
> -   struct psb_mmu_pd *pd;
> -
> -   pd = psb_mmu_get_default_pd(driver);
> -   return page_to_pfn(pd->p) << PAGE_SHIFT;
> -}
> -
>  void psb_mmu_driver_takedown(struct psb_mmu_driver *driver)
>  {
> struct drm_device *dev = driver->dev;
> --
> 1.7.10.4
>
--
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] Revert "cfg80211: make WEXT compatibility unselectable"

2015-01-01 Thread Lennart Sorensen
On Wed, Dec 31, 2014 at 01:57:59PM -0800, Linus Torvalds wrote:
> Side note: does anybody think that was really a good idea to begin
> with? I mean, Cisco iOS is just _s_ universally loved, right?
> 
> And yeah, I refuse to use "ip link" or other insane commands. Let's
> face it, "ifconfig" and "route" are perfectly fine commands, and a
> whole lot less confusing than "ip" with random crap after it.  I'm
> really not seeing why that "ip" command was seen as an improvement.
> 
> (Ok, "ip route" isn't any more complex than "route", but "ip link"
> sure as hell isn't simpler than "ifconfig" for most things I can think
> of)

Well at least in the past (not sure these days), ifconfig was reading
rather inefficiently from /proc rather than using netlink, and it had
annoying bugs like only showing the first 9 characters of the interface
name, not handling IPv6 (I think that has been fixed by now), and many
other awfulnesses.

I just did a quick check to see how ifconfig does longer interface names
and got this:
tun0-12345678:2: error fetching interface information: Device not found

for an interface I had renamed to tun0-123456789

ip had no issue with it.

Renaming it to tun0-12345678 made ifconfig not die on it.  I wonder if
someone failed to understand that 15 character interface names meant
that 15 characters before the NULL should be allowed.  If did show all
of the 14 characters though, so the old cut at 9 character limit is at
least gone these days.

ifconfig seems to just be broken for many cases of perfectly nice features
in the kernel.

So yes some parts of ip are pretty painful, while others are rather nice
(I certainly like ip route, where the output actually matches the syntax
of the input, unlike the route command).

Would be nice if all features of the ip command were actually documented,
but they clearly are not.

-- 
Len Sorensen
--
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] arch: mips: kernel: traps: Remove some unused functions

2015-01-01 Thread Leonid Yegoshin
Is it a New Year joke?

Did you try to build vmlinux MIPS binary?

- Leonid


Re: [PATCH] arch: arm: mm: ioremap: Remove unused function

2015-01-01 Thread Thomas Petazzoni
Dear Rickard Strandqvist,

On Thu,  1 Jan 2015 20:10:51 +0100, Rickard Strandqvist wrote:
> Remove the function pci_ioremap_set_mem_type() that is not used anywhere.
> 
> This was partially found by using a static code analysis program called 
> cppcheck.
> 
> Signed-off-by: Rickard Strandqvist 

Hum, I was supposed to use this in arch/arm/mach-mvebu/ to make sure
that PCI I/O regions are mapped strongly-ordered. We're indeed doing it
for PCI mem regions, but we never did it for PCI I/O regions. I
remember there has been some discussions about this, but I don't
remember the outcome, and whether it has affected the fact that mapping
PCI I/O regions strongly-ordered for mach-mvebu was never merged.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
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] acpi: acpica: utuuid: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function acpi_ut_convert_string_to_uuid() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/acpi/acpica/acutils.h |5 -
 drivers/acpi/acpica/utuuid.c  |   29 -
 2 files changed, 34 deletions(-)

diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index 486d342..18b82cd 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -782,9 +782,4 @@ int acpi_ut_file_vprintf(ACPI_FILE file, const char 
*format, va_list args);
 int acpi_ut_file_printf(ACPI_FILE file, const char *format, ...);
 #endif
 
-/*
- * utuuid -- UUID support functions
- */
-void acpi_ut_convert_string_to_uuid(char *in_string, u8 *uuid_buffer);
-
 #endif /* _ACUTILS_H */
diff --git a/drivers/acpi/acpica/utuuid.c b/drivers/acpi/acpica/utuuid.c
index 4dc3313..a829c74 100644
--- a/drivers/acpi/acpica/utuuid.c
+++ b/drivers/acpi/acpica/utuuid.c
@@ -65,32 +65,3 @@ ACPI_MODULE_NAME("utuuid")
 const u8 acpi_gbl_map_to_uuid_offset[UUID_BUFFER_LENGTH] = {
6, 4, 2, 0, 11, 9, 16, 14, 19, 21, 24, 26, 28, 30, 32, 34
 };
-
-/***
- *
- * FUNCTION:acpi_ut_convert_string_to_uuid
- *
- * PARAMETERS:  in_string   - 36-byte formatted UUID string
- *  uuid_buffer - Where the 16-byte UUID buffer is returned
- *
- * RETURN:  None. Output data is returned in the uuid_buffer
- *
- * DESCRIPTION: Convert a 36-byte formatted UUID string to 16-byte UUID buffer
- *
- 
**/
-
-void acpi_ut_convert_string_to_uuid(char *in_string, u8 *uuid_buffer)
-{
-   u32 i;
-
-   for (i = 0; i < UUID_BUFFER_LENGTH; i++) {
-   uuid_buffer[i] =
-   (acpi_ut_ascii_char_to_hex
-(in_string[acpi_gbl_map_to_uuid_offset[i]]) << 4);
-
-   uuid_buffer[i] |=
-   acpi_ut_ascii_char_to_hex(in_string
- [acpi_gbl_map_to_uuid_offset[i] +
-  1]);
-   }
-}
-- 
1.7.10.4

--
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] serial: altera-uart: fix NULL device in log message

2015-01-01 Thread Pavel Machek
On Tue 2014-12-16 15:28:34, Ley Foon Tan wrote:
> Add device pointer to port->dev.
> 
> Before:
> 
> "(NULL device *): ttyAL0 at MMIO 0x2020 (irq = 6, base_baud = 3125000)
> is a Altera UART"
> 
> After:
> "altera_uart 2020.serial: ttyAL0 at MMIO 0x2020 (irq = 6, base_baud = 3125000)
> is a Altera UART"
> 
> Signed-off-by: Ley Foon Tan 

Acked-by: Pavel Machek 

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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] arch: mips: mm: page: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function sb1_dma_init() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/mips/mm/page.c |   15 ---
 1 file changed, 15 deletions(-)

diff --git a/arch/mips/mm/page.c b/arch/mips/mm/page.c
index b611102..aa43df2 100644
--- a/arch/mips/mm/page.c
+++ b/arch/mips/mm/page.c
@@ -592,21 +592,6 @@ struct dmadscr {
u64 pad_b;
 } cacheline_aligned_in_smp page_descr[DM_NUM_CHANNELS];
 
-void sb1_dma_init(void)
-{
-   int i;
-
-   for (i = 0; i < DM_NUM_CHANNELS; i++) {
-   const u64 base_val = CPHYSADDR((unsigned long)&page_descr[i]) |
-V_DM_DSCR_BASE_RINGSZ(1);
-   void *base_reg = IOADDR(A_DM_REGISTER(i, R_DM_DSCR_BASE));
-
-   __raw_writeq(base_val, base_reg);
-   __raw_writeq(base_val | M_DM_DSCR_BASE_RESET, base_reg);
-   __raw_writeq(base_val | M_DM_DSCR_BASE_ENABL, base_reg);
-   }
-}
-
 void clear_page(void *page)
 {
u64 to_phys = CPHYSADDR((unsigned long)page);
-- 
1.7.10.4

--
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] isdn: hisax: hfc4s8s_l1: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
Read_hfc32() Write_hfc32() Write_hfc16()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/isdn/hisax/hfc4s8s_l1.c |   21 -
 1 file changed, 21 deletions(-)

diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
index fc9f9d0..0e5d673 100644
--- a/drivers/isdn/hisax/hfc4s8s_l1.c
+++ b/drivers/isdn/hisax/hfc4s8s_l1.c
@@ -225,20 +225,6 @@ fWrite_hfc8(hfc4s8s_hw *a, u_char c)
 }
 
 static inline void
-Write_hfc16(hfc4s8s_hw *a, u_char b, u_short c)
-{
-   SetRegAddr(a, b);
-   outw(c, a->iobase);
-}
-
-static inline void
-Write_hfc32(hfc4s8s_hw *a, u_char b, u_long c)
-{
-   SetRegAddr(a, b);
-   outl(c, a->iobase);
-}
-
-static inline void
 fWrite_hfc32(hfc4s8s_hw *a, u_long c)
 {
outl(c, a->iobase);
@@ -266,13 +252,6 @@ Read_hfc16(hfc4s8s_hw *a, u_char b)
 }
 
 static inline u_long
-Read_hfc32(hfc4s8s_hw *a, u_char b)
-{
-   SetRegAddr(a, b);
-   return (inl((volatile u_int) a->iobase));
-}
-
-static inline u_long
 fRead_hfc32(hfc4s8s_hw *a)
 {
return (inl((volatile u_int) a->iobase));
-- 
1.7.10.4

--
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] arch: mips: net: bpf_jit: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function emit_daddiu() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/mips/net/bpf_jit.c |   10 --
 1 file changed, 10 deletions(-)

diff --git a/arch/mips/net/bpf_jit.c b/arch/mips/net/bpf_jit.c
index 9b55143..5b942f8 100644
--- a/arch/mips/net/bpf_jit.c
+++ b/arch/mips/net/bpf_jit.c
@@ -231,16 +231,6 @@ static inline void emit_ori(unsigned int dst, unsigned 
src, u32 imm,
}
 }
 
-static inline void emit_daddiu(unsigned int dst, unsigned int src,
-  int imm, struct jit_ctx *ctx)
-{
-   /*
-* Only used for stack, so the imm is relatively small
-* and it fits in 15-bits
-*/
-   emit_instr(ctx, daddiu, dst, src, imm);
-}
-
 static inline void emit_addiu(unsigned int dst, unsigned int src,
  u32 imm, struct jit_ctx *ctx)
 {
-- 
1.7.10.4

--
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: phy: phy-fsl-usb: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
fsl_otg_tick_timer() view_ulpi()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/usb/phy/phy-fsl-usb.c |   35 ---
 1 file changed, 35 deletions(-)

diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c
index f1ea599..395d84c 100644
--- a/drivers/usb/phy/phy-fsl-usb.c
+++ b/drivers/usb/phy/phy-fsl-usb.c
@@ -107,19 +107,6 @@ static void (*_fsl_writel)(u32 v, unsigned __iomem *p);
 #define fsl_writel(val, addr)  writel(val, addr)
 #endif /* CONFIG_PPC32 */
 
-/* Routines to access transceiver ULPI registers */
-u8 view_ulpi(u8 addr)
-{
-   u32 temp;
-
-   temp = 0x4000 | (addr << 16);
-   fsl_writel(temp, &usb_dr_regs->ulpiview);
-   udelay(1000);
-   while (temp & 0x40)
-   temp = fsl_readl(&usb_dr_regs->ulpiview);
-   return (le32_to_cpu(temp) & 0xff00) >> 8;
-}
-
 int write_ulpi(u8 addr, u8 data)
 {
u32 temp;
@@ -460,28 +447,6 @@ static void fsl_otg_fsm_del_timer(struct otg_fsm *fsm, 
enum otg_fsm_timer t)
fsl_otg_del_timer(fsm, timer);
 }
 
-/*
- * Reduce timer count by 1, and find timeout conditions.
- * Called by fsl_otg 1ms timer interrupt
- */
-int fsl_otg_tick_timer(void)
-{
-   struct fsl_otg_timer *tmp_timer, *del_tmp;
-   int expired = 0;
-
-   list_for_each_entry_safe(tmp_timer, del_tmp, &active_timers, list) {
-   tmp_timer->count--;
-   /* check if timer expires */
-   if (!tmp_timer->count) {
-   list_del(&tmp_timer->list);
-   tmp_timer->function(tmp_timer->data);
-   expired = 1;
-   }
-   }
-
-   return expired;
-}
-
 /* Reset controller, not reset the bus */
 void otg_reset_controller(void)
 {
-- 
1.7.10.4

--
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] video: fbdev: exynos: exynos_mipi_dsi_common: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
exynos_mipi_dsi_fifo_clear() exynos_mipi_dsi_set_data_transfer_mode()
exynos_mipi_dsi_enable_frame_done_int()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 .../video/fbdev/exynos/exynos_mipi_dsi_common.c|   53 
 .../video/fbdev/exynos/exynos_mipi_dsi_common.h|7 ---
 2 files changed, 60 deletions(-)

diff --git a/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c 
b/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c
index 85edabf..d7b4abc 100644
--- a/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c
+++ b/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c
@@ -690,15 +690,6 @@ void exynos_mipi_dsi_init_interrupt(struct 
mipi_dsim_device *dsim)
exynos_mipi_dsi_set_interrupt_mask(dsim, src, 1);
 }
 
-int exynos_mipi_dsi_enable_frame_done_int(struct mipi_dsim_device *dsim,
-   unsigned int enable)
-{
-   /* enable only frame done interrupt */
-   exynos_mipi_dsi_set_interrupt_mask(dsim, INTMSK_FRAME_DONE, enable);
-
-   return 0;
-}
-
 void exynos_mipi_dsi_stand_by(struct mipi_dsim_device *dsim,
unsigned int enable)
 {
@@ -819,30 +810,6 @@ int exynos_mipi_dsi_set_hs_enable(struct mipi_dsim_device 
*dsim)
return 0;
 }
 
-int exynos_mipi_dsi_set_data_transfer_mode(struct mipi_dsim_device *dsim,
-   unsigned int mode)
-{
-   if (mode) {
-   if (dsim->state != DSIM_STATE_HSCLKEN) {
-   dev_err(dsim->dev, "HS Clock lane is not enabled.\n");
-   return -EINVAL;
-   }
-
-   exynos_mipi_dsi_set_lcdc_transfer_mode(dsim, 0);
-   } else {
-   if (dsim->state == DSIM_STATE_INIT || dsim->state ==
-   DSIM_STATE_ULPS) {
-   dev_err(dsim->dev,
-   "DSI Master is not STOP or HSDT state.\n");
-   return -EINVAL;
-   }
-
-   exynos_mipi_dsi_set_cpu_transfer_mode(dsim, 0);
-   }
-
-   return 0;
-}
-
 int exynos_mipi_dsi_get_frame_done_status(struct mipi_dsim_device *dsim)
 {
return _exynos_mipi_dsi_get_frame_done_status(dsim);
@@ -855,26 +822,6 @@ int exynos_mipi_dsi_clear_frame_done(struct 
mipi_dsim_device *dsim)
return 0;
 }
 
-int exynos_mipi_dsi_fifo_clear(struct mipi_dsim_device *dsim,
-   unsigned int val)
-{
-   int try = TRY_FIFO_CLEAR;
-
-   exynos_mipi_dsi_sw_reset_release(dsim);
-   exynos_mipi_dsi_func_reset(dsim);
-
-   do {
-   if (exynos_mipi_dsi_get_sw_reset_release(dsim)) {
-   exynos_mipi_dsi_init_interrupt(dsim);
-   dev_dbg(dsim->dev, "reset release done.\n");
-   return 0;
-   }
-   } while (--try);
-
-   dev_err(dsim->dev, "failed to clear dsim fifo.\n");
-   return -EAGAIN;
-}
-
 MODULE_AUTHOR("InKi Dae ");
 MODULE_DESCRIPTION("Samusung SoC MIPI-DSI common driver");
 MODULE_LICENSE("GPL");
diff --git a/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.h 
b/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.h
index 4125522..5c1c30b 100644
--- a/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.h
+++ b/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.h
@@ -31,16 +31,9 @@ int exynos_mipi_dsi_set_display_mode(struct mipi_dsim_device 
*dsim,
struct mipi_dsim_config *dsim_info);
 int exynos_mipi_dsi_init_link(struct mipi_dsim_device *dsim);
 int exynos_mipi_dsi_set_hs_enable(struct mipi_dsim_device *dsim);
-int exynos_mipi_dsi_set_data_transfer_mode(struct mipi_dsim_device *dsim,
-   unsigned int mode);
-int exynos_mipi_dsi_enable_frame_done_int(struct mipi_dsim_device *dsim,
-   unsigned int enable);
 int exynos_mipi_dsi_get_frame_done_status(struct mipi_dsim_device *dsim);
 int exynos_mipi_dsi_clear_frame_done(struct mipi_dsim_device *dsim);
 
 extern struct fb_info *registered_fb[FB_MAX] __read_mostly;
 
-int exynos_mipi_dsi_fifo_clear(struct mipi_dsim_device *dsim,
-   unsigned int val);
-
 #endif /* _EXYNOS_MIPI_DSI_COMMON_H */
-- 
1.7.10.4

--
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] arch: mips: ath79: gpio: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
ath79_gpio_function_disable() ath79_gpio_function_enable()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/mips/ath79/common.h |2 --
 arch/mips/ath79/gpio.c   |   10 --
 2 files changed, 12 deletions(-)

diff --git a/arch/mips/ath79/common.h b/arch/mips/ath79/common.h
index a312071..9eb841a 100644
--- a/arch/mips/ath79/common.h
+++ b/arch/mips/ath79/common.h
@@ -24,8 +24,6 @@ unsigned long ath79_get_sys_clk_rate(const char *id);
 
 void ath79_ddr_wb_flush(unsigned int reg);
 
-void ath79_gpio_function_enable(u32 mask);
-void ath79_gpio_function_disable(u32 mask);
 void ath79_gpio_function_setup(u32 set, u32 clear);
 void ath79_gpio_init(void);
 
diff --git a/arch/mips/ath79/gpio.c b/arch/mips/ath79/gpio.c
index 8d025b0..d0a5d92 100644
--- a/arch/mips/ath79/gpio.c
+++ b/arch/mips/ath79/gpio.c
@@ -168,16 +168,6 @@ void ath79_gpio_function_setup(u32 set, u32 clear)
spin_unlock_irqrestore(&ath79_gpio_lock, flags);
 }
 
-void ath79_gpio_function_enable(u32 mask)
-{
-   ath79_gpio_function_setup(mask, 0);
-}
-
-void ath79_gpio_function_disable(u32 mask)
-{
-   ath79_gpio_function_setup(0, mask);
-}
-
 void __init ath79_gpio_init(void)
 {
int err;
-- 
1.7.10.4

--
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] arch: arm: mm: ioremap: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function pci_ioremap_set_mem_type() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/arm/include/asm/io.h |6 --
 arch/arm/mm/ioremap.c |5 -
 2 files changed, 11 deletions(-)

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 1805674..8d8087f 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -180,12 +180,6 @@ static inline void __iomem *__typesafe_io(unsigned long 
addr)
 #define PCI_IO_VIRT_BASE   0xfee0
 #define PCI_IOBASE ((void __iomem *)PCI_IO_VIRT_BASE)
 
-#if defined(CONFIG_PCI)
-void pci_ioremap_set_mem_type(int mem_type);
-#else
-static inline void pci_ioremap_set_mem_type(int mem_type) {}
-#endif
-
 extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr);
 
 /*
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index d1e5ad7..0f25610 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -440,11 +440,6 @@ EXPORT_SYMBOL(__arm_iounmap);
 #ifdef CONFIG_PCI
 static int pci_ioremap_mem_type = MT_DEVICE;
 
-void pci_ioremap_set_mem_type(int mem_type)
-{
-   pci_ioremap_mem_type = mem_type;
-}
-
 int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr)
 {
BUG_ON(offset + SZ_64K > IO_SPACE_LIMIT);
-- 
1.7.10.4

--
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] Drivers: isdn: gigaset: checkpatch cleanup

2015-01-01 Thread Tilman Schmidt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Bas,

I have several objections to your patch.

Am 31.12.2014 um 18:34 schrieb Bas Peters:
> I have not been able to test the code as I do not have access to
> the hardware but since no new features were really added I don't
> think that should pose a problem.

It's always problematic to change code you cannot test.
At the very least, if you do coding style cleanups you should test
whether the result still compiles and generates the same code as before.

> --- a/drivers/isdn/gigaset/bas-gigaset.c +++
> b/drivers/isdn/gigaset/bas-gigaset.c @@ -261,11 +261,12 @@ static
> inline void dump_urb(enum debuglevel level, const char *tag, { 
> #ifdef CONFIG_GIGASET_DEBUG int i; + gig_dbg(level, "%s
> urb(0x%08lx)->{", tag, (unsigned long) urb); if (urb) { 
> gig_dbg(level, -  "  dev=0x%08lx, pipe=%s:EP%d/DV%d:%s, " 
> -
> "hcpriv=0x%08lx, transfer_flags=0x%x,", + "  dev=0x%08lx,
> pipe=%s:EP%d/DV%d:%s, +   hcpriv=0x%08lx, 
> transfer_flags=0x%x,",

This is syntactically wrong and won't compile. You cannot have an
unescaped newline inside a string literal.

> @@ -2312,13 +2312,13 @@ static int gigaset_probe(struct
> usb_interface *interface, /* Reject application specific
> interfaces */ if (hostif->desc.bInterfaceClass != 255) { -
> dev_warn(&udev->dev, "%s: bInterfaceClass == %d\n", +
> dev_warn(&udev->dev, "%s: bInterfaceClass == %d\n",\ __func__,
> hostif->desc.bInterfaceClass); return -ENODEV; }
> 
> dev_info(&udev->dev, - "%s: Device matched (Vendor: 0x%x,
> Product: 0x%x)\n", +   "%s: Device matched (Vendor: 0x%x, Product:
> 0x%x)\n",\ __func__, le16_to_cpu(udev->descriptor.idVendor), 
> le16_to_cpu(udev->descriptor.idProduct));

This looks strange, and not like correct coding style. Why would you
want to escape the end of line after a function argument?

> --- a/drivers/isdn/gigaset/common.c +++
> b/drivers/isdn/gigaset/common.c @@ -53,7 +53,7 @@ void
> gigaset_dbg_buffer(enum debuglevel level, const unsigned char
> *msg, { unsigned char outbuf[80]; unsigned char c; -  size_t space =
> sizeof outbuf - 1; +  size_t space = sizeof(outbuf - 1);

This is wrong. The sizeof operator must be applied to the array
variable outbuf, not to the expression (outbuf - 1).

> --- a/drivers/isdn/gigaset/ev-layer.c +++
> b/drivers/isdn/gigaset/ev-layer.c

> @@ -1355,8 +1351,20 @@ static void do_action(int action, struct
> cardstate *cs, }
> 
> for (i = 0; i < 4; ++i) { -   val = simple_strtoul(s, (char 
> **) &e,
> 10); -if (val > INT_MAX || e == s) +  
> unsigned long *e; + +
> val = kstrtoul(s, 10, e); +   if (val == -EINVAL) { +
> dev_err(cs->dev, "Parsing error on converting string to\ +
> unsigned long\n"); +  break; +
> } + if (val == -ERANGE) { +
> dev_err(cs->dev, "Overflow error converting string to\ +
> unsigned long\n"); +  break; +
> } + if (val > INT_MAX || *e ==
> s) break; if (i == 3) { if (*e)

This cannot work. The pointer variable e gets dereferenced without
ever being initialized. The type mismatches when declaring e as
pointing to an unsigned long but comparing *e to s in one place and to
a character literal in another point make me wonder which semantics
you had in mind for e in the first place.
Also your error messages are not helpful for someone reading the log
and trying to find out what went wrong, and not very readable because
of the big stretch of whitespace you insert between the words "to" and
"unsigned". In fact I'm not even convinced it's a good idea to emit a
log message at all here.

> --- a/drivers/isdn/gigaset/gigaset.h +++
> b/drivers/isdn/gigaset/gigaset.h @@ -94,8 +94,7 @@ enum debuglevel
> { #define gig_dbg(level, format, arg...)  
> \ do {  \ if
> (unlikely(((enum debuglevel)gigaset_debuglevel) & (level))) \ -
> printk(KERN_DEBUG KBUILD_MODNAME ": " format "\n", \ -
>##
> arg); \ + 
> dev_dbg(cs->dev, KBUILD_MODNAME ": " format "\n")\ 
> } while (0) #define DEBUG_DEFAULT (DEBUG_TRANSCMD | DEBUG_CMD |
> DEBUG_USBREQ)
> 

This will not work when
- - there is no cs variable in the context where the macro is used or
- - cs->dev doesn't contain a valid device pointer or
- - the format string references additional arguments,
all of which actually occur in the driver.

> --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c 
> @@ -624,14 +624,14 @@ int gigaset_isdn_regdev(struct cardstate *cs,
> const char *isdnid) { isdn_if *iif;
> 
> - iif = kmalloc(sizeof *iif, GFP_KERNEL); +   iif =
> kmalloc(sizeof(*iif, GFP_KERNEL)); if (!iif) { pr_err("out of
> memory\n"); 

Re: [GIT PULL] Audit fixes for 3.19 #2

2015-01-01 Thread Al Viro
On Thu, Jan 01, 2015 at 12:01:49AM +, Al Viro wrote:

> Umm...  How about just adding a function that would be used instead of
> all those
> struct filename filename = { .name = name };
> and created an object that would be destroyed later by putname()?

... such as getname_kernel(), actually.  There are 5 places like that:
fs/exec.c:open_exec(), fs/namei.c:do_path_lookup(),
fs/namei.c:kern_path_mountpoint(), fs/namei.c:do_file_open_root(),
fs/open.c:filp_open().  Said that, I'm not sure that no call chains
allow names just under PATH_MAX, so getname_kernel() might need to be
taught to handle those.

--
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] ovl: Prevent rw remount when it should be ro mount

2015-01-01 Thread Sedat Dilek
On Thu, Jan 1, 2015 at 4:38 PM, Seunghun Lee  wrote:
> Overlayfs should be mounted read-only when upper fs is r/o or nonexistend.
> But now it can be remounted read-write and this can causes kernel panic.
> So we should prevent read-write remount when the above situation.
>

Cannot say much to the code, but you have some typos in your commit-message.
Here some corrections... wording, style etc.

...when upper-fs (with a dash) is read-only (if you write read-write
below) or nonexisten*t*...
...this can cause (without s at the end)...
...when the above situation *happens* (missing word)...

- Sedat -

> Signed-off-by: Seunghun Lee 
> ---
>  fs/overlayfs/super.c | 11 +++
>  1 file changed, 11 insertions(+)
>
> diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
> index 84f3144..8944651 100644
> --- a/fs/overlayfs/super.c
> +++ b/fs/overlayfs/super.c
> @@ -522,10 +522,21 @@ static int ovl_show_options(struct seq_file *m, struct 
> dentry *dentry)
> return 0;
>  }
>
> +static int ovl_remount(struct super_block *sb, int *flags, char *data)
> +{
> +   struct ovl_fs *ufs = sb->s_fs_info;
> +
> +   if (!ufs->upper_mnt || (ufs->upper_mnt->mnt_sb->s_flags & MS_RDONLY))
> +   *flags |= MS_RDONLY;
> +
> +   return 0;
> +}
> +
>  static const struct super_operations ovl_super_operations = {
> .put_super  = ovl_put_super,
> .statfs = ovl_statfs,
> .show_options   = ovl_show_options,
> +   .remount_fs = ovl_remount,
>  };
>
>  enum {
> --
> 2.1.3
>
--
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: [GIT PULL] Audit fixes for 3.19 #2

2015-01-01 Thread Paul Moore
On Wed, Dec 31, 2014 at 7:01 PM, Al Viro  wrote:
> On Wed, Dec 31, 2014 at 05:08:12PM -0500, Paul Moore wrote:
>
>> The getname/putname hacks work in the normal file case, but it falls apart
>> when you start talking about AF_UNIX socket files where the filename string
>> doesn't go through the getname/putname refcount tricks.  In the past (no idea
>> how far back this goes off the top of my head) this wasn't an issue since the
>> code which recorded the filenames in the audit records was broken, but since
>> we just "fixed" that problem, the AF_UNIX socket problem is now making an
>> appearance.
>>
>> At least that is how it looks to me right now, if I'm wrong about this and 
>> I'm
>> missing an obvious fix I'm all ears/eyes/etc.
>
> Umm...  How about just adding a function that would be used instead of
> all those
> struct filename filename = { .name = name };
> and created an object that would be destroyed later by putname()?

That was one of the thoughts I had, but considering all the love for
the audit subsystem I wasn't certain if that would be well received by
the other kernel devs.  Now that we at least have the panic/oops
resolved, that frees up some time for debate/discussion; I'll work up
a patchset that takes this approach and we'll see what pushback there
is, if any.

-- 
paul moore
www.paul-moore.com
--
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: [GIT PULL] Audit fixes for 3.19 #2

2015-01-01 Thread Paul Moore
On Wed, Dec 31, 2014 at 5:54 PM, Linus Torvalds
 wrote:
> On Wed, Dec 31, 2014 at 2:08 PM, Paul Moore  wrote:
>>
>> The getname/putname hacks work in the normal file case, but it falls apart
>> when you start talking about AF_UNIX socket files where the filename string
>> doesn't go through the getname/putname refcount tricks.  In the past (no idea
>> how far back this goes off the top of my head) this wasn't an issue since the
>> code which recorded the filenames in the audit records was broken, but since
>> we just "fixed" that problem, the AF_UNIX socket problem is now making an
>> appearance.
>
> Ugh. Ok, I pulled the thing, even if I really hope for a better
> solution long-term. That better solution may well be to get rid of all
> the audit hackery in getname()/putname(), I wouldn't mind that at all.

Thanks.  We'll make this better, I'm confident of that, I'm just not
certain if it will be v3.19-rcX or v3.20 material at this point.

-- 
paul moore
www.paul-moore.com
--
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] arch: arm: mm: cache-feroceon-l2: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
l2_inv_pa() l2_clean_pa()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/arm/mm/cache-feroceon-l2.c |   10 --
 1 file changed, 10 deletions(-)

diff --git a/arch/arm/mm/cache-feroceon-l2.c b/arch/arm/mm/cache-feroceon-l2.c
index e028a7f..c2eac97 100644
--- a/arch/arm/mm/cache-feroceon-l2.c
+++ b/arch/arm/mm/cache-feroceon-l2.c
@@ -65,11 +65,6 @@ static inline void l2_put_va(unsigned long vaddr)
 #endif
 }
 
-static inline void l2_clean_pa(unsigned long addr)
-{
-   __asm__("mcr p15, 1, %0, c15, c9, 3" : : "r" (addr));
-}
-
 static inline void l2_clean_pa_range(unsigned long start, unsigned long end)
 {
unsigned long va_start, va_end, flags;
@@ -96,11 +91,6 @@ static inline void l2_clean_inv_pa(unsigned long addr)
__asm__("mcr p15, 1, %0, c15, c10, 3" : : "r" (addr));
 }
 
-static inline void l2_inv_pa(unsigned long addr)
-{
-   __asm__("mcr p15, 1, %0, c15, c11, 3" : : "r" (addr));
-}
-
 static inline void l2_inv_pa_range(unsigned long start, unsigned long end)
 {
unsigned long va_start, va_end, flags;
-- 
1.7.10.4

--
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] arch: arm: mach-rpc: ecard: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
ecard_disablefiq() ecard_enablefiq()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/arm/mach-rpc/ecard.c |   29 -
 1 file changed, 29 deletions(-)

diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
index fcb1d59..e5c8caf 100644
--- a/arch/arm/mach-rpc/ecard.c
+++ b/arch/arm/mach-rpc/ecard.c
@@ -462,35 +462,6 @@ static struct irq_chip ecard_chip = {
.irq_unmask = ecard_irq_unmask,
 };
 
-void ecard_enablefiq(unsigned int fiqnr)
-{
-   ecard_t *ec = slot_to_ecard(fiqnr);
-
-   if (ec) {
-   if (!ec->ops)
-   ec->ops = &ecard_default_ops;
-
-   if (ec->claimed && ec->ops->fiqenable)
-   ec->ops->fiqenable(ec, fiqnr);
-   else
-   printk(KERN_ERR "ecard: rejecting request to "
-   "enable FIQs for %d\n", fiqnr);
-   }
-}
-
-void ecard_disablefiq(unsigned int fiqnr)
-{
-   ecard_t *ec = slot_to_ecard(fiqnr);
-
-   if (ec) {
-   if (!ec->ops)
-   ec->ops = &ecard_default_ops;
-
-   if (ec->ops->fiqdisable)
-   ec->ops->fiqdisable(ec, fiqnr);
-   }
-}
-
 static void ecard_dump_irq_state(void)
 {
ecard_t *ec;
-- 
1.7.10.4

--
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: linux-next: Tree for Dec 31 (usb/dwc2)

2015-01-01 Thread Randy Dunlap
On 12/30/14 17:29, Stephen Rothwell wrote:
> Hi all,
> 
> There will only be intermittent releases of linux-next between now and
> Jan 5.
> 
> Changes since 20141226:
> 

on i386, when CONFIG_USB=m, CONFIG_USB_GADGET=y, and CONFIG_USB_DWC2=y:

drivers/built-in.o: In function `_dwc2_hcd_urb_dequeue':
hcd.c:(.text+0x7db39): undefined reference to `usb_hcd_check_unlink_urb'
hcd.c:(.text+0x7dc50): undefined reference to `usb_hcd_unlink_urb_from_ep'
hcd.c:(.text+0x7dc76): undefined reference to `usb_hcd_giveback_urb'
drivers/built-in.o: In function `_dwc2_hcd_start':
hcd.c:(.text+0x7e707): undefined reference to `usb_hcd_resume_root_hub'
drivers/built-in.o: In function `dwc2_assign_and_init_hc':
hcd.c:(.text+0x7f969): undefined reference to `usb_hcd_unmap_urb_for_dma'
drivers/built-in.o: In function `_dwc2_hcd_urb_enqueue':
hcd.c:(.text+0x7fd81): undefined reference to `usb_hcd_link_urb_to_ep'
hcd.c:(.text+0x7ff66): undefined reference to `usb_hcd_unlink_urb_from_ep'
drivers/built-in.o: In function `dwc2_host_complete':
(.text+0x800fc): undefined reference to `usb_hcd_unlink_urb_from_ep'
drivers/built-in.o: In function `dwc2_host_complete':
(.text+0x8012c): undefined reference to `usb_hcd_giveback_urb'
drivers/built-in.o: In function `dwc2_hcd_init':
(.text+0x8060a): undefined reference to `usb_disabled'
drivers/built-in.o: In function `dwc2_hcd_init':
(.text+0x80735): undefined reference to `usb_create_hcd'
drivers/built-in.o: In function `dwc2_hcd_init':
(.text+0x80a91): undefined reference to `usb_add_hcd'
drivers/built-in.o: In function `dwc2_hcd_init':
(.text+0x80acc): undefined reference to `usb_put_hcd'
drivers/built-in.o: In function `dwc2_hcd_remove':
(.text+0x80ba2): undefined reference to `usb_remove_hcd'
drivers/built-in.o: In function `dwc2_hcd_remove':
(.text+0x80bc1): undefined reference to `usb_put_hcd'
drivers/built-in.o: In function `dwc2_hc_handle_tt_clear.isra.13':
hcd_intr.c:(.text+0x80f9a): undefined reference to `usb_hub_clear_tt_buffer'
drivers/built-in.o: In function `dwc2_hcd_qtd_add':
(.text+0x82e14): undefined reference to `usb_calc_bus_time'




-- 
~Randy
--
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] arch: blackfin: kernel: kgdb: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function kgdb_post_primary_code() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/blackfin/kernel/kgdb.c |   13 -
 1 file changed, 13 deletions(-)

diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c
index fa53fae..b1cc04f 100644
--- a/arch/blackfin/kernel/kgdb.c
+++ b/arch/blackfin/kernel/kgdb.c
@@ -359,19 +359,6 @@ void kgdb_roundup_cpu(int cpu, unsigned long flags)
 static unsigned long kgdb_arch_imask;
 #endif
 
-void kgdb_post_primary_code(struct pt_regs *regs, int e_vector, int err_code)
-{
-   if (kgdb_single_step)
-   preempt_enable();
-
-#ifdef CONFIG_IPIPE
-   if (kgdb_arch_imask) {
-   cpu_pda[raw_smp_processor_id()].ex_imask = kgdb_arch_imask;
-   kgdb_arch_imask = 0;
-   }
-#endif
-}
-
 int kgdb_arch_handle_exception(int vector, int signo,
   int err_code, char *remcom_in_buffer,
   char *remcom_out_buffer,
-- 
1.7.10.4

--
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] gpu: drm: qxl: qxl_fb: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
qxl_fbdev_qobj_is_fb() qxl_get_handle_for_primary_fb()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/gpu/drm/qxl/qxl_drv.h |4 
 drivers/gpu/drm/qxl/qxl_fb.c  |   22 --
 2 files changed, 26 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index 7c6cafe..090b9e0 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -379,9 +379,6 @@ qxl_bo_physical_address(struct qxl_device *qdev, struct 
qxl_bo *bo,
 
 int qxl_fbdev_init(struct qxl_device *qdev);
 void qxl_fbdev_fini(struct qxl_device *qdev);
-int qxl_get_handle_for_primary_fb(struct qxl_device *qdev,
- struct drm_file *file_priv,
- uint32_t *handle);
 void qxl_fbdev_set_suspend(struct qxl_device *qdev, int state);
 
 /* qxl_display.c */
@@ -550,7 +547,6 @@ irqreturn_t qxl_irq_handler(int irq, void *arg);
 
 /* qxl_fb.c */
 int qxl_fb_init(struct qxl_device *qdev);
-bool qxl_fbdev_qobj_is_fb(struct qxl_device *qdev, struct qxl_bo *qobj);
 
 int qxl_debugfs_add_files(struct qxl_device *qdev,
  struct drm_info_list *files,
diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu/drm/qxl/qxl_fb.c
index 3d7c1d0..4242577 100644
--- a/drivers/gpu/drm/qxl/qxl_fb.c
+++ b/drivers/gpu/drm/qxl/qxl_fb.c
@@ -426,21 +426,6 @@ static void qxlfb_destroy_pinned_object(struct 
drm_gem_object *gobj)
drm_gem_object_unreference_unlocked(gobj);
 }
 
-int qxl_get_handle_for_primary_fb(struct qxl_device *qdev,
- struct drm_file *file_priv,
- uint32_t *handle)
-{
-   int r;
-   struct drm_gem_object *gobj = qdev->fbdev_qfb->obj;
-
-   BUG_ON(!gobj);
-   /* drm_get_handle_create adds a reference - good */
-   r = drm_gem_handle_create(file_priv, gobj, handle);
-   if (r)
-   return r;
-   return 0;
-}
-
 static int qxlfb_create_pinned_object(struct qxl_fbdev *qfbdev,
  struct drm_mode_fb_cmd2 *mode_cmd,
  struct drm_gem_object **gobj_p)
@@ -710,10 +695,3 @@ void qxl_fbdev_set_suspend(struct qxl_device *qdev, int 
state)
 {
fb_set_suspend(qdev->mode_info.qfbdev->helper.fbdev, state);
 }
-
-bool qxl_fbdev_qobj_is_fb(struct qxl_device *qdev, struct qxl_bo *qobj)
-{
-   if (qobj == gem_to_qxl_bo(qdev->mode_info.qfbdev->qfb.obj))
-   return true;
-   return false;
-}
-- 
1.7.10.4

--
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] md: dm-thin-metadata: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function dm_pool_get_data_block_size() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/md/dm-thin-metadata.c |9 -
 drivers/md/dm-thin-metadata.h |2 --
 2 files changed, 11 deletions(-)

diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
index e9d33ad..c7914a5 100644
--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
@@ -1639,15 +1639,6 @@ int dm_pool_get_metadata_dev_size(struct 
dm_pool_metadata *pmd,
return r;
 }
 
-int dm_pool_get_data_block_size(struct dm_pool_metadata *pmd, sector_t *result)
-{
-   down_read(&pmd->root_lock);
-   *result = pmd->data_block_size;
-   up_read(&pmd->root_lock);
-
-   return 0;
-}
-
 int dm_pool_get_data_dev_size(struct dm_pool_metadata *pmd, dm_block_t *result)
 {
int r = -EINVAL;
diff --git a/drivers/md/dm-thin-metadata.h b/drivers/md/dm-thin-metadata.h
index e3c857d..6258c14 100644
--- a/drivers/md/dm-thin-metadata.h
+++ b/drivers/md/dm-thin-metadata.h
@@ -182,8 +182,6 @@ int dm_pool_get_free_metadata_block_count(struct 
dm_pool_metadata *pmd,
 int dm_pool_get_metadata_dev_size(struct dm_pool_metadata *pmd,
  dm_block_t *result);
 
-int dm_pool_get_data_block_size(struct dm_pool_metadata *pmd, sector_t 
*result);
-
 int dm_pool_get_data_dev_size(struct dm_pool_metadata *pmd, dm_block_t 
*result);
 
 int dm_pool_block_is_used(struct dm_pool_metadata *pmd, dm_block_t b, bool 
*result);
-- 
1.7.10.4

--
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] arch: avr32: mach-at32ap: at32ap700x: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function set_ebi_sfr_bits() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/avr32/mach-at32ap/at32ap700x.c |   11 ---
 1 file changed, 11 deletions(-)

diff --git a/arch/avr32/mach-at32ap/at32ap700x.c 
b/arch/avr32/mach-at32ap/at32ap700x.c
index 37b7560..d84516c 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -744,17 +744,6 @@ struct clk at32_hmatrix_clk = {
.users  = 1,
 };
 
-/*
- * Set bits in the HMATRIX Special Function Register (SFR) used by the
- * External Bus Interface (EBI). This can be used to enable special
- * features like CompactFlash support, NAND Flash support, etc. on
- * certain chipselects.
- */
-static inline void set_ebi_sfr_bits(u32 mask)
-{
-   hmatrix_sfr_set_bits(HMATRIX_SLAVE_EBI, mask);
-}
-
 /* 
  *  Timer/Counter (TC)
  *  */
-- 
1.7.10.4

--
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] media: platform: vsp1: vsp1_hsit: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function vsp1_hsit_read() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/media/platform/vsp1/vsp1_hsit.c |5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/media/platform/vsp1/vsp1_hsit.c 
b/drivers/media/platform/vsp1/vsp1_hsit.c
index db2950a..9fb003b 100644
--- a/drivers/media/platform/vsp1/vsp1_hsit.c
+++ b/drivers/media/platform/vsp1/vsp1_hsit.c
@@ -26,11 +26,6 @@
  * Device Access
  */
 
-static inline u32 vsp1_hsit_read(struct vsp1_hsit *hsit, u32 reg)
-{
-   return vsp1_read(hsit->entity.vsp1, reg);
-}
-
 static inline void vsp1_hsit_write(struct vsp1_hsit *hsit, u32 reg, u32 data)
 {
vsp1_write(hsit->entity.vsp1, reg, data);
-- 
1.7.10.4

--
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] tools: perf: util: session: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function perf_session__peek_event() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 tools/perf/util/session.c |   55 -
 tools/perf/util/session.h |5 -
 2 files changed, 60 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 6702ac2..f861788 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -902,61 +902,6 @@ static void event_swap(union perf_event *event, bool 
sample_id_all)
swap(event, sample_id_all);
 }
 
-int perf_session__peek_event(struct perf_session *session, off_t file_offset,
-void *buf, size_t buf_sz,
-union perf_event **event_ptr,
-struct perf_sample *sample)
-{
-   union perf_event *event;
-   size_t hdr_sz, rest;
-   int fd;
-
-   if (session->one_mmap && !session->header.needs_swap) {
-   event = file_offset - session->one_mmap_offset +
-   session->one_mmap_addr;
-   goto out_parse_sample;
-   }
-
-   if (perf_data_file__is_pipe(session->file))
-   return -1;
-
-   fd = perf_data_file__fd(session->file);
-   hdr_sz = sizeof(struct perf_event_header);
-
-   if (buf_sz < hdr_sz)
-   return -1;
-
-   if (lseek(fd, file_offset, SEEK_SET) == (off_t)-1 ||
-   readn(fd, &buf, hdr_sz) != (ssize_t)hdr_sz)
-   return -1;
-
-   event = (union perf_event *)buf;
-
-   if (session->header.needs_swap)
-   perf_event_header__bswap(&event->header);
-
-   if (event->header.size < hdr_sz)
-   return -1;
-
-   rest = event->header.size - hdr_sz;
-
-   if (readn(fd, &buf, rest) != (ssize_t)rest)
-   return -1;
-
-   if (session->header.needs_swap)
-   event_swap(event, perf_evlist__sample_id_all(session->evlist));
-
-out_parse_sample:
-
-   if (sample && event->header.type < PERF_RECORD_USER_TYPE_START &&
-   perf_evlist__parse_sample(session->evlist, event, sample))
-   return -1;
-
-   *event_ptr = event;
-
-   return 0;
-}
-
 static s64 perf_session__process_event(struct perf_session *session,
   union perf_event *event,
   struct perf_tool *tool,
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index a4be851..1d60297 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -44,11 +44,6 @@ void perf_session__delete(struct perf_session *session);
 
 void perf_event_header__bswap(struct perf_event_header *hdr);
 
-int perf_session__peek_event(struct perf_session *session, off_t file_offset,
-void *buf, size_t buf_sz,
-union perf_event **event_ptr,
-struct perf_sample *sample);
-
 int __perf_session__process_events(struct perf_session *session,
   u64 data_offset, u64 data_size, u64 size,
   struct perf_tool *tool);
-- 
1.7.10.4

--
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] mfd: db8500-prcmu: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function prcmu_get_boot_status() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/mfd/db8500-prcmu.c |9 -
 1 file changed, 9 deletions(-)

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 193cf16..b517501 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -675,15 +675,6 @@ bool prcmu_has_arm_maxopp(void)
 }
 
 /**
- * prcmu_get_boot_status - PRCMU boot status checking
- * Returns: the current PRCMU boot status
- */
-int prcmu_get_boot_status(void)
-{
-   return readb(tcdm_base + PRCM_BOOT_STATUS);
-}
-
-/**
  * prcmu_set_rc_a2p - This function is used to run few power state sequences
  * @val: Value to be set, i.e. transition requested
  * Returns: 0 on success, -EINVAL on invalid argument
-- 
1.7.10.4

--
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] arch: mips: kernel: traps: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
do_bp() do_ftlb() do_dsp() do_mcheck() do_mdmx() do_msa() do_msa_fpe()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/mips/kernel/traps.c |  185 --
 1 file changed, 185 deletions(-)

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 22b19c2..59c8e0d 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -854,85 +854,6 @@ static void do_trap_or_bp(struct pt_regs *regs, unsigned 
int code,
}
 }
 
-asmlinkage void do_bp(struct pt_regs *regs)
-{
-   unsigned int opcode, bcode;
-   enum ctx_state prev_state;
-   unsigned long epc;
-   u16 instr[2];
-   mm_segment_t seg;
-
-   seg = get_fs();
-   if (!user_mode(regs))
-   set_fs(KERNEL_DS);
-
-   prev_state = exception_enter();
-   if (get_isa16_mode(regs->cp0_epc)) {
-   /* Calculate EPC. */
-   epc = exception_epc(regs);
-   if (cpu_has_mmips) {
-   if ((__get_user(instr[0], (u16 __user 
*)msk_isa16_mode(epc)) ||
-   (__get_user(instr[1], (u16 __user 
*)msk_isa16_mode(epc + 2)
-   goto out_sigsegv;
-   opcode = (instr[0] << 16) | instr[1];
-   } else {
-   /* MIPS16e mode */
-   if (__get_user(instr[0],
-  (u16 __user *)msk_isa16_mode(epc)))
-   goto out_sigsegv;
-   bcode = (instr[0] >> 6) & 0x3f;
-   do_trap_or_bp(regs, bcode, "Break");
-   goto out;
-   }
-   } else {
-   if (__get_user(opcode,
-  (unsigned int __user *) exception_epc(regs)))
-   goto out_sigsegv;
-   }
-
-   /*
-* There is the ancient bug in the MIPS assemblers that the break
-* code starts left to bit 16 instead to bit 6 in the opcode.
-* Gas is bug-compatible, but not always, grrr...
-* We handle both cases with a simple heuristics.  --macro
-*/
-   bcode = ((opcode >> 6) & ((1 << 20) - 1));
-   if (bcode >= (1 << 10))
-   bcode >>= 10;
-
-   /*
-* notify the kprobe handlers, if instruction is likely to
-* pertain to them.
-*/
-   switch (bcode) {
-   case BRK_KPROBE_BP:
-   if (notify_die(DIE_BREAK, "debug", regs, bcode,
-  regs_to_trapnr(regs), SIGTRAP) == NOTIFY_STOP)
-   goto out;
-   else
-   break;
-   case BRK_KPROBE_SSTEPBP:
-   if (notify_die(DIE_SSTEPBP, "single_step", regs, bcode,
-  regs_to_trapnr(regs), SIGTRAP) == NOTIFY_STOP)
-   goto out;
-   else
-   break;
-   default:
-   break;
-   }
-
-   do_trap_or_bp(regs, bcode, "Break");
-
-out:
-   set_fs(seg);
-   exception_exit(prev_state);
-   return;
-
-out_sigsegv:
-   force_sig(SIGSEGV, current);
-   goto out;
-}
-
 asmlinkage void do_tr(struct pt_regs *regs)
 {
u32 opcode, tcode = 0;
@@ -1297,46 +1218,6 @@ out:
exception_exit(prev_state);
 }
 
-asmlinkage void do_msa_fpe(struct pt_regs *regs)
-{
-   enum ctx_state prev_state;
-
-   prev_state = exception_enter();
-   die_if_kernel("do_msa_fpe invoked from kernel context!", regs);
-   force_sig(SIGFPE, current);
-   exception_exit(prev_state);
-}
-
-asmlinkage void do_msa(struct pt_regs *regs)
-{
-   enum ctx_state prev_state;
-   int err;
-
-   prev_state = exception_enter();
-
-   if (!cpu_has_msa || test_thread_flag(TIF_32BIT_FPREGS)) {
-   force_sig(SIGILL, current);
-   goto out;
-   }
-
-   die_if_kernel("do_msa invoked from kernel context!", regs);
-
-   err = enable_restore_fp_context(1);
-   if (err)
-   force_sig(SIGILL, current);
-out:
-   exception_exit(prev_state);
-}
-
-asmlinkage void do_mdmx(struct pt_regs *regs)
-{
-   enum ctx_state prev_state;
-
-   prev_state = exception_enter();
-   force_sig(SIGILL, current);
-   exception_exit(prev_state);
-}
-
 /*
  * Called with interrupts disabled.
  */
@@ -1370,36 +1251,6 @@ asmlinkage void do_watch(struct pt_regs *regs)
exception_exit(prev_state);
 }
 
-asmlinkage void do_mcheck(struct pt_regs *regs)
-{
-   const int field = 2 * sizeof(unsigned long);
-   int multi_match = regs->cp0_status & ST0_TS;
-   enum ctx_state prev_state;
-
-   prev_state = exception_enter();
-   show_regs(regs);
-
-   if (multi_match) {
-   printk("Index   : %0x\n", read_c0_index());
- 

[PATCH] mailbox: pl320-ipc: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
clear_destination() set_destination()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/mailbox/pl320-ipc.c |   12 
 1 file changed, 12 deletions(-)

diff --git a/drivers/mailbox/pl320-ipc.c b/drivers/mailbox/pl320-ipc.c
index f3755e0..adb969b 100644
--- a/drivers/mailbox/pl320-ipc.c
+++ b/drivers/mailbox/pl320-ipc.c
@@ -56,18 +56,6 @@ static DEFINE_MUTEX(ipc_m1_lock);
 static DECLARE_COMPLETION(ipc_completion);
 static ATOMIC_NOTIFIER_HEAD(ipc_notifier);
 
-static inline void set_destination(int source, int mbox)
-{
-   __raw_writel(CHAN_MASK(source), ipc_base + IPCMxDSET(mbox));
-   __raw_writel(CHAN_MASK(source), ipc_base + IPCMxMSET(mbox));
-}
-
-static inline void clear_destination(int source, int mbox)
-{
-   __raw_writel(CHAN_MASK(source), ipc_base + IPCMxDCLEAR(mbox));
-   __raw_writel(CHAN_MASK(source), ipc_base + IPCMxMCLEAR(mbox));
-}
-
 static void __ipc_send(int mbox, u32 *data)
 {
int i;
-- 
1.7.10.4

--
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] arch: mips: fw: arc: misc.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
ArcGetSystemId() ArcSaveConfiguration() ArcRestart() ArcPowerDown() ArcHalt()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/mips/fw/arc/misc.c |   40 
 1 file changed, 40 deletions(-)

diff --git a/arch/mips/fw/arc/misc.c b/arch/mips/fw/arc/misc.c
index f9f5307..214dc88 100644
--- a/arch/mips/fw/arc/misc.c
+++ b/arch/mips/fw/arc/misc.c
@@ -20,34 +20,6 @@
 #include 
 
 VOID
-ArcHalt(VOID)
-{
-   bc_disable();
-   local_irq_disable();
-   ARC_CALL0(halt);
-never: goto never;
-}
-
-VOID
-ArcPowerDown(VOID)
-{
-   bc_disable();
-   local_irq_disable();
-   ARC_CALL0(pdown);
-never: goto never;
-}
-
-/* XXX is this a soft reset basically? XXX */
-VOID
-ArcRestart(VOID)
-{
-   bc_disable();
-   local_irq_disable();
-   ARC_CALL0(restart);
-never: goto never;
-}
-
-VOID
 ArcReboot(VOID)
 {
bc_disable();
@@ -65,18 +37,6 @@ ArcEnterInteractiveMode(VOID)
 never: goto never;
 }
 
-LONG
-ArcSaveConfiguration(VOID)
-{
-   return ARC_CALL0(cfg_save);
-}
-
-struct linux_sysid *
-ArcGetSystemId(VOID)
-{
-   return (struct linux_sysid *) ARC_CALL0(get_sysid);
-}
-
 VOID __init
 ArcFlushAllCaches(VOID)
 {
-- 
1.7.10.4

--
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] arch: arm: nwfpe: softfloat.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
floatx80_lt_quiet() floatx80_le_quiet() floatx80_eq_signaling()
floatx80_le() floatx80_to_int32_round_to_zero() float64_lt_quiet()
float64_le_quiet() float64_eq_signaling() float32_lt_quiet()
float32_le_quiet() float32_eq_signaling()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/arm/nwfpe/softfloat.c |  320 
 arch/arm/nwfpe/softfloat.h |   11 --
 2 files changed, 331 deletions(-)

diff --git a/arch/arm/nwfpe/softfloat.c b/arch/arm/nwfpe/softfloat.c
index ffa6b43..dda30ab 100644
--- a/arch/arm/nwfpe/softfloat.c
+++ b/arch/arm/nwfpe/softfloat.c
@@ -1568,78 +1568,6 @@ flag float32_lt( float32 a, float32 b )
 
 /*
 ---
-Returns 1 if the single-precision floating-point value `a' is equal to the
-corresponding value `b', and 0 otherwise.  The invalid exception is raised
-if either operand is a NaN.  Otherwise, the comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.

-*/
-flag float32_eq_signaling( float32 a, float32 b )
-{
-
-if (( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
- || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
-   ) {
-float_raise( float_flag_invalid );
-return 0;
-}
-return ( a == b ) || ( (bits32) ( ( a | b )<<1 ) == 0 );
-
-}
-
-/*

-Returns 1 if the single-precision floating-point value `a' is less than or
-equal to the corresponding value `b', and 0 otherwise.  Quiet NaNs do not
-cause an exception.  Otherwise, the comparison is performed according to the
-IEC/IEEE Standard for Binary Floating-point Arithmetic.

-*/
-flag float32_le_quiet( float32 a, float32 b )
-{
-flag aSign, bSign;
-//int16 aExp, bExp;
-
-if (( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
- || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
-   ) {
-/* Do nothing, even if NaN as we're quiet */
-return 0;
-}
-aSign = extractFloat32Sign( a );
-bSign = extractFloat32Sign( b );
-if ( aSign != bSign ) return aSign || ( (bits32) ( ( a | b )<<1 ) == 0 );
-return ( a == b ) || ( aSign ^ ( a < b ) );
-
-}
-
-/*

-Returns 1 if the single-precision floating-point value `a' is less than
-the corresponding value `b', and 0 otherwise.  Quiet NaNs do not cause an
-exception.  Otherwise, the comparison is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.

-*/
-flag float32_lt_quiet( float32 a, float32 b )
-{
-flag aSign, bSign;
-
-if (( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
- || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
-   ) {
-/* Do nothing, even if NaN as we're quiet */
-return 0;
-}
-aSign = extractFloat32Sign( a );
-bSign = extractFloat32Sign( b );
-if ( aSign != bSign ) return aSign && ( (bits32) ( ( a | b )<<1 ) != 0 );
-return ( a != b ) && ( aSign ^ ( a < b ) );
-
-}
-
-/*

 Returns the result of converting the double-precision floating-point value
 `a' to the 32-bit two's complement integer format.  The conversion is
 performed according to the IEC/IEEE Standard for Binary Floating-point
@@ -2453,78 +2381,6 @@ flag float64_lt( float64 a, float64 b )
 
 }
 
-/*

-Returns 1 if the double-precision floating-point value `a' is equal to the
-corresponding value `b', and 0 otherwise.  The invalid exception is raised
-if either operand is a NaN.  Otherwise, the comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.

-*/
-flag float64_eq_signaling( float64 a, float64 b )
-{
-
-if (( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) )
- || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) )
-   ) {
-float_raise( float_flag_invalid );
-return 0;
-}
-return ( a == b ) || ( (bits64) ( ( a | b )<<1 ) == 0 );
-
-}
-
-/*

-Returns 1 if the double-precision floating-point value `a' is less than or
-equal to

[PATCH] staging: vt6655: mib.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
STAvClearAllCounter() STAvClear802_11Counter()
STAvUpdateTDStatCounterEx() STAvUpdateRDStatCounterEx()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/staging/vt6655/mib.c |  113 --
 drivers/staging/vt6655/mib.h |   14 --
 2 files changed, 127 deletions(-)

diff --git a/drivers/staging/vt6655/mib.c b/drivers/staging/vt6655/mib.c
index 111c018..805198f 100644
--- a/drivers/staging/vt6655/mib.c
+++ b/drivers/staging/vt6655/mib.c
@@ -25,12 +25,9 @@
  * Date: May 21, 1996
  *
  * Functions:
- *  STAvClearAllCounter - Clear All MIB Counter
  *  STAvUpdateIstStatCounter - Update ISR statistic counter
  *  STAvUpdateRDStatCounter - Update Rx statistic counter
- *  STAvUpdateRDStatCounterEx - Update Rx statistic counter and copy rcv 
data
  *  STAvUpdateTDStatCounter - Update Tx statistic counter
- *  STAvUpdateTDStatCounterEx - Update Tx statistic counter and copy tx 
data
  *  STAvUpdate802_11Counter - Update 802.11 mib counter
  *
  * Revision History:
@@ -55,24 +52,6 @@
 /*-  Export Functions  --*/
 
 /*
- * Description: Clear All Statistic Counter
- *
- * Parameters:
- *  In:
- *  pStatistic  - Pointer to Statistic Counter Data Structure
- *  Out:
- *  none
- *
- * Return Value: none
- *
- */
-void STAvClearAllCounter(PSStatCounter pStatistic)
-{
-   // set memory to zero
-   memset(pStatistic, 0, sizeof(SStatCounter));
-}
-
-/*
  * Description: Update Isr Statistic Counter
  *
  * Parameters:
@@ -348,48 +327,6 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
 }
 
 /*
- * Description: Update Rx Statistic Counter and copy Rx buffer
- *
- * Parameters:
- *  In:
- *  pStatistic  - Pointer to Statistic Counter Data Structure
- *  byRSR   - Rx Status
- *  byNewRSR- Rx Status
- *  pbyBuffer   - Rx Buffer
- *  cbFrameLength   - Rx Length
- *  Out:
- *  none
- *
- * Return Value: none
- *
- */
-
-void
-STAvUpdateRDStatCounterEx(
-   PSStatCounter   pStatistic,
-   unsigned char byRSR,
-   unsigned char byNewRSR,
-   unsigned char byRxRate,
-   unsigned char *pbyBuffer,
-   unsigned int cbFrameLength
-)
-{
-   STAvUpdateRDStatCounter(
-   pStatistic,
-   byRSR,
-   byNewRSR,
-   byRxRate,
-   pbyBuffer,
-   cbFrameLength
-);
-
-   // rx length
-   pStatistic->dwCntRxFrmLength = cbFrameLength;
-   // rx pattern, we just see 10 bytes for sample
-   memcpy(pStatistic->abyCntRxPattern, (unsigned char *)pbyBuffer, 10);
-}
-
-/*
  * Description: Update Tx Statistic Counter
  *
  * Parameters:
@@ -475,37 +412,6 @@ STAvUpdateTDStatCounter(
 }
 
 /*
- * Description: Update Tx Statistic Counter and copy Tx buffer
- *
- * Parameters:
- *  In:
- *  pStatistic  - Pointer to Statistic Counter Data Structure
- *  pbyBuffer   - Tx Buffer
- *  cbFrameLength   - Tx Length
- *  Out:
- *  none
- *
- * Return Value: none
- *
- */
-void
-STAvUpdateTDStatCounterEx(
-   PSStatCounter   pStatistic,
-   unsigned char *pbyBuffer,
-   unsigned long cbFrameLength
-)
-{
-   unsigned int uPktLength;
-
-   uPktLength = (unsigned int)cbFrameLength;
-
-   // tx length
-   pStatistic->dwCntTxBufLength = uPktLength;
-   // tx pattern, we just see 16 bytes for sample
-   memcpy(pStatistic->abyCntTxPattern, pbyBuffer, 16);
-}
-
-/*
  * Description: Update 802.11 mib counter
  *
  * Parameters:
@@ -541,22 +447,3 @@ STAvUpdate802_11Counter(
p802_11Counter->MulticastReceivedFrameCount = (unsigned long long) 
(pStatistic->dwRsrBroadcast +

pStatistic->dwRsrMulticast);
 }
-
-/*
- * Description: Clear 802.11 mib counter
- *
- * Parameters:
- *  In:
- *  p802_11Counter  - Pointer to 802.11 mib counter
- *  Out:
- *  none
- *
- * Return Value: none
- *
- */
-void
-STAvClear802_11Counter(PSDot11Counters p802_11Counter)
-{
-   // set memory to zero
-   memset(p802_11Counter, 0, sizeof(SDot11Counters));
-}
diff --git a/drivers/staging/vt6655/mib.h b/drivers/staging/vt6655/mib.h
index 732bdda..9b98773 100644
--- a/drivers/staging/vt6655/mib.h
+++ b/drivers/staging/vt6655/mib.h
@@ -311,33 +311,19 @@ typedef struct tagSStatCounter {
 #endif
 } SStatCounter, *PSStatCounter;
 
-void STAvClearAllCounter(PSStatCounter pStatistic);
-
 void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, unsigned long dwIsr);
 
 void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
 unsigned char byRSR, unsigned char byNewRSR, 
unsigned char byRxRate,
 unsigned char *pbyBuffer, unsigned int 
cbFrameLength);
 
-void STAvUpdateRDStatCounterEx(P

[PATCH] acpi: acpica: utmisc.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function acpi_ut_is_aml_table() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/acpi/acpica/acutils.h |2 --
 drivers/acpi/acpica/utmisc.c  |   28 
 2 files changed, 30 deletions(-)

diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index 486d342..ec5da45 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -570,8 +570,6 @@ const struct acpi_exception_info 
*acpi_ut_validate_exception(acpi_status
 
 u8 acpi_ut_is_pci_root_bridge(char *id);
 
-u8 acpi_ut_is_aml_table(struct acpi_table_header *table);
-
 acpi_status
 acpi_ut_walk_package_tree(union acpi_operand_object *source_object,
  void *target_object,
diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c
index 2e2bb14..a9440af 100644
--- a/drivers/acpi/acpica/utmisc.c
+++ b/drivers/acpi/acpica/utmisc.c
@@ -77,34 +77,6 @@ u8 acpi_ut_is_pci_root_bridge(char *id)
 
 
/***
  *
- * FUNCTION:acpi_ut_is_aml_table
- *
- * PARAMETERS:  table   - An ACPI table
- *
- * RETURN:  TRUE if table contains executable AML; FALSE otherwise
- *
- * DESCRIPTION: Check ACPI Signature for a table that contains AML code.
- *  Currently, these are DSDT,SSDT,PSDT. All other table types are
- *  data tables that do not contain AML code.
- *
- 
**/
-
-u8 acpi_ut_is_aml_table(struct acpi_table_header *table)
-{
-
-   /* These are the only tables that contain executable AML */
-
-   if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT) ||
-   ACPI_COMPARE_NAME(table->signature, ACPI_SIG_PSDT) ||
-   ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT)) {
-   return (TRUE);
-   }
-
-   return (FALSE);
-}
-
-/***
- *
  * FUNCTION:acpi_ut_dword_byte_swap
  *
  * PARAMETERS:  value   - Value to be converted
-- 
1.7.10.4

--
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] arch: arm: mach-omap2: voltage.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
voltdm_for_each_pwrdm() omap_change_voltscale_method()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/arm/mach-omap2/voltage.c |   65 ++---
 arch/arm/mach-omap2/voltage.h |5 
 2 files changed, 3 insertions(+), 67 deletions(-)

diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index 3783b86..43e42fd 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -224,37 +224,6 @@ int omap_voltage_register_pmic(struct voltagedomain 
*voltdm,
 }
 
 /**
- * omap_change_voltscale_method() - API to change the voltage scaling method.
- * @voltdm:pointer to the VDD whose voltage scaling method
- * has to be changed.
- * @voltscale_method:  the method to be used for voltage scaling.
- *
- * This API can be used by the board files to change the method of voltage
- * scaling between vpforceupdate and vcbypass. The parameter values are
- * defined in voltage.h
- */
-void omap_change_voltscale_method(struct voltagedomain *voltdm,
- int voltscale_method)
-{
-   if (!voltdm || IS_ERR(voltdm)) {
-   pr_warn("%s: VDD specified does not exist!\n", __func__);
-   return;
-   }
-
-   switch (voltscale_method) {
-   case VOLTSCALE_VPFORCEUPDATE:
-   voltdm->scale = omap_vp_forceupdate_scale;
-   return;
-   case VOLTSCALE_VCBYPASS:
-   voltdm->scale = omap_vc_bypass_scale;
-   return;
-   default:
-   pr_warn("%s: Trying to change the method of voltage scaling to 
an unsupported one!\n",
-   __func__);
-   }
-}
-
-/**
  * omap_voltage_late_init() - Init the various voltage parameters
  *
  * This API is to be called in the later stages of the
@@ -321,10 +290,9 @@ static struct voltagedomain *_voltdm_lookup(const char 
*name)
  * @voltdm: struct voltagedomain * to add the powerdomain to
  * @pwrdm: struct powerdomain * to associate with a voltagedomain
  *
- * Associate the powerdomain @pwrdm with a voltagedomain @voltdm.  This
- * enables the use of voltdm_for_each_pwrdm().  Returns -EINVAL if
- * presented with invalid pointers; -ENOMEM if memory could not be allocated;
- * or 0 upon success.
+ * Associate the powerdomain @pwrdm with a voltagedomain @voltdm.
+ * Returns -EINVAL if presented with invalid pointers;
+ * -ENOMEM if memory could not be allocated; or 0 upon success.
  */
 int voltdm_add_pwrdm(struct voltagedomain *voltdm, struct powerdomain *pwrdm)
 {
@@ -340,33 +308,6 @@ int voltdm_add_pwrdm(struct voltagedomain *voltdm, struct 
powerdomain *pwrdm)
 }
 
 /**
- * voltdm_for_each_pwrdm - call function for each pwrdm in a voltdm
- * @voltdm: struct voltagedomain * to iterate over
- * @fn: callback function *
- *
- * Call the supplied function @fn for each powerdomain in the
- * voltagedomain @voltdm.  Returns -EINVAL if presented with invalid
- * pointers; or passes along the last return value of the callback
- * function, which should be 0 for success or anything else to
- * indicate failure.
- */
-int voltdm_for_each_pwrdm(struct voltagedomain *voltdm,
- int (*fn)(struct voltagedomain *voltdm,
-   struct powerdomain *pwrdm))
-{
-   struct powerdomain *pwrdm;
-   int ret = 0;
-
-   if (!fn)
-   return -EINVAL;
-
-   list_for_each_entry(pwrdm, &voltdm->pwrdm_list, voltdm_node)
-   ret = (*fn)(voltdm, pwrdm);
-
-   return ret;
-}
-
-/**
  * voltdm_for_each - call function on each registered voltagedomain
  * @fn: callback function *
  *
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
index f7f2879..d8208f3 100644
--- a/arch/arm/mach-omap2/voltage.h
+++ b/arch/arm/mach-omap2/voltage.h
@@ -163,8 +163,6 @@ struct omap_volt_data *omap_voltage_get_voltdata(struct 
voltagedomain *voltdm,
unsigned long volt);
 int omap_voltage_register_pmic(struct voltagedomain *voltdm,
   struct omap_voltdm_pmic *pmic);
-void omap_change_voltscale_method(struct voltagedomain *voltdm,
-   int voltscale_method);
 int omap_voltage_late_init(void);
 
 extern void omap2xxx_voltagedomains_init(void);
@@ -177,9 +175,6 @@ void voltdm_init(struct voltagedomain **voltdm_list);
 int voltdm_add_pwrdm(struct voltagedomain *voltdm, struct powerdomain *pwrdm);
 int voltdm_for_each(int (*fn)(struct voltagedomain *voltdm, void *user),
void *user);
-int voltdm_for_each_pwrdm(struct voltagedomain *voltdm,
- int (*fn)(struct voltagedomain *voltdm,
-   struct powerdomain *pwrdm));
 int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
 void voltdm_reset(struct voltagedomain *voltdm);
 unsigne

[PATCH] gpu: drm: qxl: qxl_cmd.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
qxl_io_flush_surfaces() qxl_io_flush_release()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/gpu/drm/qxl/qxl_cmd.c |   10 --
 drivers/gpu/drm/qxl/qxl_drv.h |2 --
 2 files changed, 12 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
index 9782364..f62d857 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
@@ -360,16 +360,6 @@ void qxl_io_notify_oom(struct qxl_device *qdev)
outb(0, qdev->io_base + QXL_IO_NOTIFY_OOM);
 }
 
-void qxl_io_flush_release(struct qxl_device *qdev)
-{
-   outb(0, qdev->io_base + QXL_IO_FLUSH_RELEASE);
-}
-
-void qxl_io_flush_surfaces(struct qxl_device *qdev)
-{
-   wait_for_io_cmd(qdev, 0, QXL_IO_FLUSH_SURFACES_ASYNC);
-}
-
 
 void qxl_io_destroy_primary(struct qxl_device *qdev)
 {
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index 7c6cafe..c84cd95 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -467,8 +467,6 @@ int qxl_io_update_area(struct qxl_device *qdev, struct 
qxl_bo *surf,
 void qxl_io_reset(struct qxl_device *qdev);
 void qxl_io_monitors_config(struct qxl_device *qdev);
 int qxl_ring_push(struct qxl_ring *ring, const void *new_elt, bool 
interruptible);
-void qxl_io_flush_release(struct qxl_device *qdev);
-void qxl_io_flush_surfaces(struct qxl_device *qdev);
 
 union qxl_release_info *qxl_release_map(struct qxl_device *qdev,
struct qxl_release *release);
-- 
1.7.10.4

--
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] power: ab8500_fg.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function ab8500_fg_reinit() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/power/ab8500_fg.c|   14 --
 include/linux/mfd/abx500/ab8500-bm.h |1 -
 2 files changed, 15 deletions(-)

diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index 217da4b..72c82ab 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -2434,20 +2434,6 @@ static void ab8500_fg_reinit_work(struct work_struct 
*work)
}
 }
 
-/**
- * ab8500_fg_reinit() - forces FG algorithm to reinitialize with current values
- *
- * This function can be used to force the FG algorithm to recalculate a new
- * voltage based battery capacity.
- */
-void ab8500_fg_reinit(void)
-{
-   struct ab8500_fg *di = ab8500_fg_get();
-   /* User won't be notified if a null pointer returned. */
-   if (di != NULL)
-   queue_delayed_work(di->fg_wq, &di->fg_reinit_work, 0);
-}
-
 /* Exposure to the sysfs interface */
 
 struct ab8500_fg_sysfs_entry {
diff --git a/include/linux/mfd/abx500/ab8500-bm.h 
b/include/linux/mfd/abx500/ab8500-bm.h
index cc892a8..12a5b39 100644
--- a/include/linux/mfd/abx500/ab8500-bm.h
+++ b/include/linux/mfd/abx500/ab8500-bm.h
@@ -461,7 +461,6 @@ struct ab8500_fg;
 #ifdef CONFIG_AB8500_BM
 extern struct abx500_bm_data ab8500_bm_data;
 
-void ab8500_fg_reinit(void);
 void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA);
 struct ab8500_btemp *ab8500_btemp_get(void);
 int ab8500_btemp_get_batctrl_temp(struct ab8500_btemp *btemp);
-- 
1.7.10.4

--
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] media: pci: saa7134: saa7134-video.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function saa7134_queue() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/media/pci/saa7134/saa7134-video.c |5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/media/pci/saa7134/saa7134-video.c 
b/drivers/media/pci/saa7134/saa7134-video.c
index fc4a427..cf40573 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -1098,11 +1098,6 @@ static int saa7134_s_ctrl(struct v4l2_ctrl *ctrl)
 
 /* -- */
 
-static inline struct vb2_queue *saa7134_queue(struct file *file)
-{
-   return video_devdata(file)->queue;
-}
-
 static int video_open(struct file *file)
 {
struct video_device *vdev = video_devdata(file);
-- 
1.7.10.4

--
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] scsi: cxgbi: libcxgbi.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
csk_print_ip() csk_print_port()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/scsi/cxgbi/libcxgbi.c |   28 
 1 file changed, 28 deletions(-)

diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 674d498..7d2884b 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -2434,34 +2434,6 @@ int cxgbi_set_conn_param(struct iscsi_cls_conn *cls_conn,
 }
 EXPORT_SYMBOL_GPL(cxgbi_set_conn_param);
 
-static inline int csk_print_port(struct cxgbi_sock *csk, char *buf)
-{
-   int len;
-
-   cxgbi_sock_get(csk);
-   len = sprintf(buf, "%hu\n", ntohs(csk->daddr.sin_port));
-   cxgbi_sock_put(csk);
-
-   return len;
-}
-
-static inline int csk_print_ip(struct cxgbi_sock *csk, char *buf)
-{
-   int len;
-
-   cxgbi_sock_get(csk);
-   if (csk->csk_family == AF_INET)
-   len = sprintf(buf, "%pI4",
- &csk->daddr.sin_addr.s_addr);
-   else
-   len = sprintf(buf, "%pI6",
- &csk->daddr6.sin6_addr);
-
-   cxgbi_sock_put(csk);
-
-   return len;
-}
-
 int cxgbi_get_ep_param(struct iscsi_endpoint *ep, enum iscsi_param param,
   char *buf)
 {
-- 
1.7.10.4

--
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] arch: m68k: mac: misc.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
mac_pram_write() mac_pram_read()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/m68k/mac/misc.c |   46 --
 1 file changed, 46 deletions(-)

diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c
index 707b61a..6fe7eb6 100644
--- a/arch/m68k/mac/misc.c
+++ b/arch/m68k/mac/misc.c
@@ -453,52 +453,6 @@ void pmu_shutdown(void)
  *---
  */
 
-void mac_pram_read(int offset, __u8 *buffer, int len)
-{
-   __u8 (*func)(int);
-   int i;
-
-   switch(macintosh_config->adb_type) {
-   case MAC_ADB_IISI:
-   func = maciisi_read_pram; break;
-   case MAC_ADB_PB1:
-   case MAC_ADB_PB2:
-   func = pmu_read_pram; break;
-   case MAC_ADB_CUDA:
-   func = cuda_read_pram; break;
-   default:
-   func = via_read_pram;
-   }
-   if (!func)
-   return;
-   for (i = 0 ; i < len ; i++) {
-   buffer[i] = (*func)(offset++);
-   }
-}
-
-void mac_pram_write(int offset, __u8 *buffer, int len)
-{
-   void (*func)(int, __u8);
-   int i;
-
-   switch(macintosh_config->adb_type) {
-   case MAC_ADB_IISI:
-   func = maciisi_write_pram; break;
-   case MAC_ADB_PB1:
-   case MAC_ADB_PB2:
-   func = pmu_write_pram; break;
-   case MAC_ADB_CUDA:
-   func = cuda_write_pram; break;
-   default:
-   func = via_write_pram;
-   }
-   if (!func)
-   return;
-   for (i = 0 ; i < len ; i++) {
-   (*func)(offset++, buffer[i]);
-   }
-}
-
 void mac_poweroff(void)
 {
/*
-- 
1.7.10.4

--
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] net: fddi: skfp: smt.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function smt_ifconfig() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/net/fddi/skfp/smt.c |   12 
 1 file changed, 12 deletions(-)

diff --git a/drivers/net/fddi/skfp/smt.c b/drivers/net/fddi/skfp/smt.c
index 9edada8..cd78b7c 100644
--- a/drivers/net/fddi/skfp/smt.c
+++ b/drivers/net/fddi/skfp/smt.c
@@ -1736,18 +1736,6 @@ char *addr_to_string(struct fddi_addr *addr)
 }
 #endif
 
-#ifdef AM29K
-int smt_ifconfig(int argc, char *argv[])
-{
-   if (argc >= 2 && !strcmp(argv[0],"opt_bypass") &&
-   !strcmp(argv[1],"yes")) {
-   smc->mib.fddiSMTBypassPresent = 1 ;
-   return 0;
-   }
-   return amdfddi_config(0, argc, argv);
-}
-#endif
-
 /*
  * return static mac index
  */
-- 
1.7.10.4

--
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] net: ethernet: micrel: ksz884x.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
hw_w_phy_link_md() hw_r_phy_link_md() hw_w_phy_polarity()
hw_r_phy_polarity() hw_w_phy_crossover() hw_r_phy_crossover()
hw_r_phy_rem_cap() hw_w_phy_auto_neg() hw_r_phy_auto_neg()
hw_r_phy_link_stat() sw_get_addr() port_chk_prio() port_chk_replace_vid()
port_chk_802_1p() port_chk_diffserv() sw_chk_unk_def_port()
sw_cfg_unk_def_port() sw_cfg_chk_unk_def_deliver() sw_cfg_unk_def_deliver()
port_chk_in_filter() port_chk_dis_non_vid() port_cfg_in_filter()
port_cfg_dis_non_vid() port_chk_rmv_tag() port_chk_ins_tag()
port_cfg_rmv_tag() port_cfg_ins_tag() sw_flush_dyn_mac_table() port_cfg_tx()
port_cfg_rx() port_chk_force_flow_ctrl() port_chk_back_pressure()
port_cfg_force_flow_ctrl() port_chk_broad_storm() hw_ena_intr_bit()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/net/ethernet/micrel/ksz884x.c |  217 -
 1 file changed, 217 deletions(-)

diff --git a/drivers/net/ethernet/micrel/ksz884x.c 
b/drivers/net/ethernet/micrel/ksz884x.c
index f1ebed6c..582973f 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -1551,15 +1551,6 @@ static void hw_turn_on_intr(struct ksz_hw *hw, u32 bit)
hw_set_intr(hw, hw->intr_mask);
 }
 
-static inline void hw_ena_intr_bit(struct ksz_hw *hw, uint interrupt)
-{
-   u32 read_intr;
-
-   read_intr = readl(hw->io + KS884X_INTERRUPTS_ENABLE);
-   hw->intr_set = read_intr | interrupt;
-   writel(hw->intr_set, hw->io + KS884X_INTERRUPTS_ENABLE);
-}
-
 static inline void hw_read_intr(struct ksz_hw *hw, uint *status)
 {
*status = readl(hw->io + KS884X_INTERRUPTS_STATUS);
@@ -2125,12 +2116,6 @@ static inline void port_cfg_broad_storm(struct ksz_hw 
*hw, int p, int set)
KS8842_PORT_CTRL_1_OFFSET, PORT_BROADCAST_STORM, set);
 }
 
-static inline int port_chk_broad_storm(struct ksz_hw *hw, int p)
-{
-   return port_chk(hw, p,
-   KS8842_PORT_CTRL_1_OFFSET, PORT_BROADCAST_STORM);
-}
-
 /* Driver set switch broadcast storm protection at 10% rate. */
 #define BROADCAST_STORM_PROTECTION_RATE10
 
@@ -2283,24 +2268,6 @@ static inline void port_cfg_back_pressure(struct ksz_hw 
*hw, int p, int set)
KS8842_PORT_CTRL_2_OFFSET, PORT_BACK_PRESSURE, set);
 }
 
-static inline void port_cfg_force_flow_ctrl(struct ksz_hw *hw, int p, int set)
-{
-   port_cfg(hw, p,
-   KS8842_PORT_CTRL_2_OFFSET, PORT_FORCE_FLOW_CTRL, set);
-}
-
-static inline int port_chk_back_pressure(struct ksz_hw *hw, int p)
-{
-   return port_chk(hw, p,
-   KS8842_PORT_CTRL_2_OFFSET, PORT_BACK_PRESSURE);
-}
-
-static inline int port_chk_force_flow_ctrl(struct ksz_hw *hw, int p)
-{
-   return port_chk(hw, p,
-   KS8842_PORT_CTRL_2_OFFSET, PORT_FORCE_FLOW_CTRL);
-}
-
 /* Spanning Tree */
 
 static inline void port_cfg_dis_learn(struct ksz_hw *hw, int p, int set)
@@ -2309,82 +2276,11 @@ static inline void port_cfg_dis_learn(struct ksz_hw 
*hw, int p, int set)
KS8842_PORT_CTRL_2_OFFSET, PORT_LEARN_DISABLE, set);
 }
 
-static inline void port_cfg_rx(struct ksz_hw *hw, int p, int set)
-{
-   port_cfg(hw, p,
-   KS8842_PORT_CTRL_2_OFFSET, PORT_RX_ENABLE, set);
-}
-
-static inline void port_cfg_tx(struct ksz_hw *hw, int p, int set)
-{
-   port_cfg(hw, p,
-   KS8842_PORT_CTRL_2_OFFSET, PORT_TX_ENABLE, set);
-}
-
 static inline void sw_cfg_fast_aging(struct ksz_hw *hw, int set)
 {
sw_cfg(hw, KS8842_SWITCH_CTRL_1_OFFSET, SWITCH_FAST_AGING, set);
 }
 
-static inline void sw_flush_dyn_mac_table(struct ksz_hw *hw)
-{
-   if (!(hw->overrides & FAST_AGING)) {
-   sw_cfg_fast_aging(hw, 1);
-   mdelay(1);
-   sw_cfg_fast_aging(hw, 0);
-   }
-}
-
-/* VLAN */
-
-static inline void port_cfg_ins_tag(struct ksz_hw *hw, int p, int insert)
-{
-   port_cfg(hw, p,
-   KS8842_PORT_CTRL_1_OFFSET, PORT_INSERT_TAG, insert);
-}
-
-static inline void port_cfg_rmv_tag(struct ksz_hw *hw, int p, int remove)
-{
-   port_cfg(hw, p,
-   KS8842_PORT_CTRL_1_OFFSET, PORT_REMOVE_TAG, remove);
-}
-
-static inline int port_chk_ins_tag(struct ksz_hw *hw, int p)
-{
-   return port_chk(hw, p,
-   KS8842_PORT_CTRL_1_OFFSET, PORT_INSERT_TAG);
-}
-
-static inline int port_chk_rmv_tag(struct ksz_hw *hw, int p)
-{
-   return port_chk(hw, p,
-   KS8842_PORT_CTRL_1_OFFSET, PORT_REMOVE_TAG);
-}
-
-static inline void port_cfg_dis_non_vid(struct ksz_hw *hw, int p, int set)
-{
-   port_cfg(hw, p,
-   KS8842_PORT_CTRL_2_OFFSET, PORT_DISCARD_NON_VID, set);
-}
-
-static inline void port_cfg_in_filter(struct ksz_hw *hw, int p, int set)
-{
-   port_cfg(hw, p,
-   KS8842_PORT_CTRL_2_OFFSET, PORT_INGRESS_VLAN_FILTER, set);
-}
-
-static inline int port_chk_dis_non

[PATCH] block: rbd.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function copy_token() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/block/rbd.c |   30 --
 1 file changed, 30 deletions(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 27b71a0..922f1ab 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -4776,36 +4776,6 @@ static inline size_t next_token(const char **buf)
 }
 
 /*
- * Finds the next token in *buf, and if the provided token buffer is
- * big enough, copies the found token into it.  The result, if
- * copied, is guaranteed to be terminated with '\0'.  Note that *buf
- * must be terminated with '\0' on entry.
- *
- * Returns the length of the token found (not including the '\0').
- * Return value will be 0 if no token is found, and it will be >=
- * token_size if the token would not fit.
- *
- * The *buf pointer will be updated to point beyond the end of the
- * found token.  Note that this occurs even if the token buffer is
- * too small to hold it.
- */
-static inline size_t copy_token(const char **buf,
-   char *token,
-   size_t token_size)
-{
-size_t len;
-
-   len = next_token(buf);
-   if (len < token_size) {
-   memcpy(token, *buf, len);
-   *(token + len) = '\0';
-   }
-   *buf += len;
-
-return len;
-}
-
-/*
  * Finds the next token in *buf, dynamically allocates a buffer big
  * enough to hold a copy of it, and copies the token into the new
  * buffer.  The copy is guaranteed to be terminated with '\0'.  Note
-- 
1.7.10.4

--
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] gpu: drm: gma500: mmu.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function psb_get_default_pd_addr() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/gpu/drm/gma500/mmu.c |9 -
 1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/gma500/mmu.c b/drivers/gpu/drm/gma500/mmu.c
index 0eaf11c..557cae7 100644
--- a/drivers/gpu/drm/gma500/mmu.c
+++ b/drivers/gpu/drm/gma500/mmu.c
@@ -426,15 +426,6 @@ struct psb_mmu_pd *psb_mmu_get_default_pd(struct 
psb_mmu_driver *driver)
return pd;
 }
 
-/* Returns the physical address of the PD shared by sgx/msvdx */
-uint32_t psb_get_default_pd_addr(struct psb_mmu_driver *driver)
-{
-   struct psb_mmu_pd *pd;
-
-   pd = psb_mmu_get_default_pd(driver);
-   return page_to_pfn(pd->p) << PAGE_SHIFT;
-}
-
 void psb_mmu_driver_takedown(struct psb_mmu_driver *driver)
 {
struct drm_device *dev = driver->dev;
-- 
1.7.10.4

--
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] media: pci: mantis: mantis_core.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function write_eeprom_byte() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/media/pci/mantis/mantis_core.c |   23 ---
 1 file changed, 23 deletions(-)

diff --git a/drivers/media/pci/mantis/mantis_core.c 
b/drivers/media/pci/mantis/mantis_core.c
index 684d906..82220ea 100644
--- a/drivers/media/pci/mantis/mantis_core.c
+++ b/drivers/media/pci/mantis/mantis_core.c
@@ -56,29 +56,6 @@ static int read_eeprom_byte(struct mantis_pci *mantis, u8 
*data, u8 length)
return 0;
 }
 
-static int write_eeprom_byte(struct mantis_pci *mantis, u8 *data, u8 length)
-{
-   int err;
-
-   struct i2c_msg msg = {
-   .addr = 0x50,
-   .flags = 0,
-   .buf = data,
-   .len = length
-   };
-
-   err = i2c_transfer(&mantis->adapter, &msg, 1);
-   if (err < 0) {
-   dprintk(verbose, MANTIS_ERROR, 1,
-   "ERROR: i2c write: < err=%i length=0x%02x d0=0x%02x, 
d1=0x%02x >",
-   err, length, data[0], data[1]);
-
-   return err;
-   }
-
-   return 0;
-}
-
 static int get_mac_address(struct mantis_pci *mantis)
 {
int err;
-- 
1.7.10.4

--
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] gpu: drm: qxl: qxl_gem.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
qxl_gem_fini() qxl_gem_init()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/gpu/drm/qxl/qxl_drv.h |2 --
 drivers/gpu/drm/qxl/qxl_gem.c |   11 ---
 2 files changed, 13 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index 7c6cafe..32b7743 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -400,8 +400,6 @@ void qxl_crtc_set_from_monitors_config(struct qxl_device 
*qdev);
 void qxl_alloc_client_monitors_config(struct qxl_device *qdev, unsigned count);
 
 /* qxl_gem.c */
-int qxl_gem_init(struct qxl_device *qdev);
-void qxl_gem_fini(struct qxl_device *qdev);
 int qxl_gem_object_create(struct qxl_device *qdev, int size,
  int alignment, int initial_domain,
  bool discardable, bool kernel,
diff --git a/drivers/gpu/drm/qxl/qxl_gem.c b/drivers/gpu/drm/qxl/qxl_gem.c
index b96f0c9..fd6ef25 100644
--- a/drivers/gpu/drm/qxl/qxl_gem.c
+++ b/drivers/gpu/drm/qxl/qxl_gem.c
@@ -104,14 +104,3 @@ void qxl_gem_object_close(struct drm_gem_object *obj,
  struct drm_file *file_priv)
 {
 }
-
-int qxl_gem_init(struct qxl_device *qdev)
-{
-   INIT_LIST_HEAD(&qdev->gem.objects);
-   return 0;
-}
-
-void qxl_gem_fini(struct qxl_device *qdev)
-{
-   qxl_bo_force_delete(qdev);
-}
-- 
1.7.10.4

--
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] net: ethernet: chelsio: cxgb3: mc5.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
dbgi_rd_rsp3() dbgi_wr_addr3()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/net/ethernet/chelsio/cxgb3/mc5.c |   16 
 1 file changed, 16 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb3/mc5.c 
b/drivers/net/ethernet/chelsio/cxgb3/mc5.c
index e13b7fe..338301b 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/mc5.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/mc5.c
@@ -97,14 +97,6 @@ static int mc5_cmd_write(struct adapter *adapter, u32 cmd)
   F_DBGIRSPVALID, 1, MAX_WRITE_ATTEMPTS, 1);
 }
 
-static inline void dbgi_wr_addr3(struct adapter *adapter, u32 v1, u32 v2,
-u32 v3)
-{
-   t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR0, v1);
-   t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR1, v2);
-   t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR2, v3);
-}
-
 static inline void dbgi_wr_data3(struct adapter *adapter, u32 v1, u32 v2,
 u32 v3)
 {
@@ -113,14 +105,6 @@ static inline void dbgi_wr_data3(struct adapter *adapter, 
u32 v1, u32 v2,
t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_DATA2, v3);
 }
 
-static inline void dbgi_rd_rsp3(struct adapter *adapter, u32 *v1, u32 *v2,
-   u32 *v3)
-{
-   *v1 = t3_read_reg(adapter, A_MC5_DB_DBGI_RSP_DATA0);
-   *v2 = t3_read_reg(adapter, A_MC5_DB_DBGI_RSP_DATA1);
-   *v3 = t3_read_reg(adapter, A_MC5_DB_DBGI_RSP_DATA2);
-}
-
 /*
  * Write data to the TCAM register at address (0, 0, addr_lo) using the TCAM
  * command cmd.  The data to be written must have been set up by the caller.
-- 
1.7.10.4

--
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] arch: m68k: mvme147: config.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function mvme147_init_console_port() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/m68k/mvme147/config.c |5 -
 1 file changed, 5 deletions(-)

diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index 1bb3ce6..5da5e6e 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -209,8 +209,3 @@ void m147_scc_write (struct console *co, const char *str, 
unsigned count)
}
local_irq_restore(flags);
 }
-
-void mvme147_init_console_port (struct console *co, int cflag)
-{
-   co->write= m147_scc_write;
-}
-- 
1.7.10.4

--
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] arch: mips: lasat: sysctl.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function proc_dolasatint() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/mips/lasat/sysctl.c |   15 ---
 1 file changed, 15 deletions(-)

diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index 3b7f65c..9d65f1e 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -53,21 +53,6 @@ int proc_dolasatstring(struct ctl_table *table, int write,
return 0;
 }
 
-/* proc function to write EEPROM after changing int entry */
-int proc_dolasatint(struct ctl_table *table, int write,
-  void *buffer, size_t *lenp, loff_t *ppos)
-{
-   int r;
-
-   r = proc_dointvec(table, write, buffer, lenp, ppos);
-   if ((!write) || r)
-   return r;
-
-   lasat_write_eeprom_info();
-
-   return 0;
-}
-
 #ifdef CONFIG_DS1603
 static int rtctmp;
 
-- 
1.7.10.4

--
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] misc: sgi-gru: gruhandles.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function tfh_restart() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/misc/sgi-gru/gruhandles.c |6 --
 drivers/misc/sgi-gru/gruhandles.h |1 -
 2 files changed, 7 deletions(-)

diff --git a/drivers/misc/sgi-gru/gruhandles.c 
b/drivers/misc/sgi-gru/gruhandles.c
index 2f30bad..1ee8e82 100644
--- a/drivers/misc/sgi-gru/gruhandles.c
+++ b/drivers/misc/sgi-gru/gruhandles.c
@@ -196,12 +196,6 @@ void tfh_write_restart(struct gru_tlb_fault_handle *tfh,
start_instruction(tfh);
 }
 
-void tfh_restart(struct gru_tlb_fault_handle *tfh)
-{
-   tfh->opc = TFHOP_RESTART;
-   start_instruction(tfh);
-}
-
 void tfh_user_polling_mode(struct gru_tlb_fault_handle *tfh)
 {
tfh->opc = TFHOP_USER_POLLING_MODE;
diff --git a/drivers/misc/sgi-gru/gruhandles.h 
b/drivers/misc/sgi-gru/gruhandles.h
index 3f998b9..3d7bd36 100644
--- a/drivers/misc/sgi-gru/gruhandles.h
+++ b/drivers/misc/sgi-gru/gruhandles.h
@@ -524,7 +524,6 @@ int tfh_write_only(struct gru_tlb_fault_handle *tfh, 
unsigned long paddr,
int gaa, unsigned long vaddr, int asid, int dirty, int pagesize);
 void tfh_write_restart(struct gru_tlb_fault_handle *tfh, unsigned long paddr,
int gaa, unsigned long vaddr, int asid, int dirty, int pagesize);
-void tfh_restart(struct gru_tlb_fault_handle *tfh);
 void tfh_user_polling_mode(struct gru_tlb_fault_handle *tfh);
 void tfh_exception(struct gru_tlb_fault_handle *tfh);
 
-- 
1.7.10.4

--
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] arch: arm: plat-omap: dma.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function get_gdma_dev() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/arm/plat-omap/dma.c |8 
 1 file changed, 8 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 24770e5..6416e03 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -151,14 +151,6 @@ static int omap_dma_in_1510_mode(void)
 #endif
 
 #ifdef CONFIG_ARCH_OMAP1
-static inline int get_gdma_dev(int req)
-{
-   u32 reg = OMAP_FUNC_MUX_ARM_BASE + ((req - 1) / 5) * 4;
-   int shift = ((req - 1) % 5) * 6;
-
-   return ((omap_readl(reg) >> shift) & 0x3f) + 1;
-}
-
 static inline void set_gdma_dev(int req, int dev)
 {
u32 reg = OMAP_FUNC_MUX_ARM_BASE + ((req - 1) / 5) * 4;
-- 
1.7.10.4

--
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: gs_fpgaboot: io.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function bitswap() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/staging/gs_fpgaboot/io.c |9 -
 1 file changed, 9 deletions(-)

diff --git a/drivers/staging/gs_fpgaboot/io.c b/drivers/staging/gs_fpgaboot/io.c
index b260e45..819db53 100644
--- a/drivers/staging/gs_fpgaboot/io.c
+++ b/drivers/staging/gs_fpgaboot/io.c
@@ -79,15 +79,6 @@ void xl_shift_bytes_out(enum wbus bus_byte, unsigned char 
*pdata)
 /*
  * generic bit swap for xilinx SYSTEMMAP FPGA programming
  */
-static inline unsigned char bitswap(unsigned char s)
-{
-   unsigned char d;
-
-   d = (((s&0x80)>>7) | ((s&0x40)>>5) | ((s&0x20)>>3) | ((s&0x10)>>1) |
-   ((s&0x08)<<1) | ((s&0x04)<<3) | ((s&0x02)<<5) | ((s&0x01)<<7));
-   return d;
-}
-
 void xl_program_b(int32_t i)
 {
 }
-- 
1.7.10.4

--
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] arch: mips: pci: pci-ip27.c: Remove unused function

2015-01-01 Thread Paul Gortmaker
[[PATCH] arch: mips: pci: pci-ip27.c:  Remove unused function] On 01/01/2015 
(Thu 16:32) Rickard Strandqvist wrote:

> Remove the function pci_enable_swapping() that is not used anywhere.

A quick search shows it has been orphanware since the git epoch (~2005)
so removing it should be fine AFAICT.

P.
--

> 
> This was partially found by using a static code analysis program called 
> cppcheck.
> 
> Signed-off-by: Rickard Strandqvist 
> ---
>  arch/mips/pci/pci-ip27.c |   11 ---
>  1 file changed, 11 deletions(-)
> 
> diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c
> index 0f09eaf..55e3332 100644
> --- a/arch/mips/pci/pci-ip27.c
> +++ b/arch/mips/pci/pci-ip27.c
> @@ -200,17 +200,6 @@ static inline void pci_disable_swapping(struct pci_dev 
> *dev)
>   bridge->b_widget.w_tflush;  /* Flush */
>  }
>  
> -static inline void pci_enable_swapping(struct pci_dev *dev)
> -{
> - struct bridge_controller *bc = BRIDGE_CONTROLLER(dev->bus);
> - bridge_t *bridge = bc->base;
> - int slot = PCI_SLOT(dev->devfn);
> -
> - /* Turn on byte swapping */
> - bridge->b_device[slot].reg |= BRIDGE_DEV_SWAP_DIR;
> - bridge->b_widget.w_tflush;  /* Flush */
> -}
> -
>  static void pci_fixup_ioc3(struct pci_dev *d)
>  {
>   pci_disable_swapping(d);
> -- 
> 1.7.10.4
> 
--
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] media: i2c: adv7604.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
Removes some functions that are not used anywhere:
vblanking() hblanking()

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/media/i2c/adv7604.c |   10 --
 drivers/media/i2c/adv7842.c |   10 --
 drivers/media/i2c/ths8200.c |   10 --
 3 files changed, 30 deletions(-)

diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 47795ff..0ecca94 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -333,21 +333,11 @@ static inline struct adv7604_state *to_state(struct 
v4l2_subdev *sd)
return container_of(sd, struct adv7604_state, sd);
 }
 
-static inline unsigned hblanking(const struct v4l2_bt_timings *t)
-{
-   return V4L2_DV_BT_BLANKING_WIDTH(t);
-}
-
 static inline unsigned htotal(const struct v4l2_bt_timings *t)
 {
return V4L2_DV_BT_FRAME_WIDTH(t);
 }
 
-static inline unsigned vblanking(const struct v4l2_bt_timings *t)
-{
-   return V4L2_DV_BT_BLANKING_HEIGHT(t);
-}
-
 static inline unsigned vtotal(const struct v4l2_bt_timings *t)
 {
return V4L2_DV_BT_FRAME_HEIGHT(t);
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index 48b628b..d89898c 100644
--- a/drivers/media/i2c/adv7842.c
+++ b/drivers/media/i2c/adv7842.c
@@ -220,21 +220,11 @@ static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl 
*ctrl)
return &container_of(ctrl->handler, struct adv7842_state, hdl)->sd;
 }
 
-static inline unsigned hblanking(const struct v4l2_bt_timings *t)
-{
-   return V4L2_DV_BT_BLANKING_WIDTH(t);
-}
-
 static inline unsigned htotal(const struct v4l2_bt_timings *t)
 {
return V4L2_DV_BT_FRAME_WIDTH(t);
 }
 
-static inline unsigned vblanking(const struct v4l2_bt_timings *t)
-{
-   return V4L2_DV_BT_BLANKING_HEIGHT(t);
-}
-
 static inline unsigned vtotal(const struct v4l2_bt_timings *t)
 {
return V4L2_DV_BT_FRAME_HEIGHT(t);
diff --git a/drivers/media/i2c/ths8200.c b/drivers/media/i2c/ths8200.c
index 656d889..4ebd329 100644
--- a/drivers/media/i2c/ths8200.c
+++ b/drivers/media/i2c/ths8200.c
@@ -58,21 +58,11 @@ static inline struct ths8200_state *to_state(struct 
v4l2_subdev *sd)
return container_of(sd, struct ths8200_state, sd);
 }
 
-static inline unsigned hblanking(const struct v4l2_bt_timings *t)
-{
-   return V4L2_DV_BT_BLANKING_WIDTH(t);
-}
-
 static inline unsigned htotal(const struct v4l2_bt_timings *t)
 {
return V4L2_DV_BT_FRAME_WIDTH(t);
 }
 
-static inline unsigned vblanking(const struct v4l2_bt_timings *t)
-{
-   return V4L2_DV_BT_BLANKING_HEIGHT(t);
-}
-
 static inline unsigned vtotal(const struct v4l2_bt_timings *t)
 {
return V4L2_DV_BT_FRAME_HEIGHT(t);
-- 
1.7.10.4

--
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] net: wireless: b43legacy: radio.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function b43legacy_radio_set_tx_iq() that is not used anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 drivers/net/wireless/b43legacy/radio.c |   19 ---
 drivers/net/wireless/b43legacy/radio.h |1 -
 2 files changed, 20 deletions(-)

diff --git a/drivers/net/wireless/b43legacy/radio.c 
b/drivers/net/wireless/b43legacy/radio.c
index 8961776..9501420 100644
--- a/drivers/net/wireless/b43legacy/radio.c
+++ b/drivers/net/wireless/b43legacy/radio.c
@@ -1743,25 +1743,6 @@ u16 freq_r3A_value(u16 frequency)
return value;
 }
 
-void b43legacy_radio_set_tx_iq(struct b43legacy_wldev *dev)
-{
-   static const u8 data_high[5] = { 0x00, 0x40, 0x80, 0x90, 0xD0 };
-   static const u8 data_low[5]  = { 0x00, 0x01, 0x05, 0x06, 0x0A };
-   u16 tmp = b43legacy_radio_read16(dev, 0x001E);
-   int i;
-   int j;
-
-   for (i = 0; i < 5; i++) {
-   for (j = 0; j < 5; j++) {
-   if (tmp == (data_high[i] | data_low[j])) {
-   b43legacy_phy_write(dev, 0x0069, (i - j) << 8 |
-   0x00C0);
-   return;
-   }
-   }
-   }
-}
-
 int b43legacy_radio_selectchannel(struct b43legacy_wldev *dev,
  u8 channel,
  int synthetic_pu_workaround)
diff --git a/drivers/net/wireless/b43legacy/radio.h 
b/drivers/net/wireless/b43legacy/radio.h
index bccb3d7..dd2976d 100644
--- a/drivers/net/wireless/b43legacy/radio.h
+++ b/drivers/net/wireless/b43legacy/radio.h
@@ -92,7 +92,6 @@ void b43legacy_nrssi_hw_write(struct b43legacy_wldev *dev, 
u16 offset, s16 val);
 void b43legacy_nrssi_hw_update(struct b43legacy_wldev *dev, u16 val);
 void b43legacy_nrssi_mem_update(struct b43legacy_wldev *dev);
 
-void b43legacy_radio_set_tx_iq(struct b43legacy_wldev *dev);
 u16 b43legacy_radio_calibrationvalue(struct b43legacy_wldev *dev);
 
 #endif /* B43legacy_RADIO_H_ */
-- 
1.7.10.4

--
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] arch: cris: arch-v32: mach-a3: arbiter.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
Remove the function crisv32_arbiter_deallocate_bandwidth() that is not used 
anywhere.

This was partially found by using a static code analysis program called 
cppcheck.

Signed-off-by: Rickard Strandqvist 
---
 arch/cris/arch-v32/mach-a3/arbiter.c |   30 --
 arch/cris/arch-v32/mach-fs/arbiter.c |   26 --
 2 files changed, 56 deletions(-)

diff --git a/arch/cris/arch-v32/mach-a3/arbiter.c 
b/arch/cris/arch-v32/mach-a3/arbiter.c
index ab5c421..89931a5 100644
--- a/arch/cris/arch-v32/mach-a3/arbiter.c
+++ b/arch/cris/arch-v32/mach-a3/arbiter.c
@@ -329,36 +329,6 @@ int crisv32_arbiter_allocate_bandwidth(int client, int 
region,
return 0;
 }
 
-/*
- * Main entry for bandwidth deallocation.
- *
- * Strictly speaking, for a somewhat constant set of clients where
- * each client gets a constant bandwidth and is just enabled or
- * disabled (somewhat dynamically), no action is necessary here to
- * avoid starvation for non-zero-allocation clients, as the allocated
- * slots will just be unused. However, handing out those unused slots
- * to active clients avoids needless latency if the "fixed scheme"
- * would give unclaimed slots to an eager low-index client.
- */
-
-void crisv32_arbiter_deallocate_bandwidth(int client, int region)
-{
-   int i;
-   int total_assigned = 0;
-   int arbiter = 0;
-
-   if (client & 0x)
-   arbiter = 1;
-
-   arbiters[arbiter].requested_slots[region][client] = 0;
-   arbiters[arbiter].active_clients[region][client] = 0;
-
-   for (i = 0; i < arbiters[arbiter].nbr_clients; i++)
-   total_assigned += arbiters[arbiter].requested_slots[region][i];
-
-   crisv32_arbiter_config(arbiter, region, NBR_OF_SLOTS - total_assigned);
-}
-
 int crisv32_arbiter_watch(unsigned long start, unsigned long size,
  unsigned long clients, unsigned long accesses,
  watch_callback *cb)
diff --git a/arch/cris/arch-v32/mach-fs/arbiter.c 
b/arch/cris/arch-v32/mach-fs/arbiter.c
index c97f4d8..79f7f25 100644
--- a/arch/cris/arch-v32/mach-fs/arbiter.c
+++ b/arch/cris/arch-v32/mach-fs/arbiter.c
@@ -234,32 +234,6 @@ int crisv32_arbiter_allocate_bandwidth(int client, int 
region,
return 0;
 }
 
-/*
- * Main entry for bandwidth deallocation.
- *
- * Strictly speaking, for a somewhat constant set of clients where
- * each client gets a constant bandwidth and is just enabled or
- * disabled (somewhat dynamically), no action is necessary here to
- * avoid starvation for non-zero-allocation clients, as the allocated
- * slots will just be unused. However, handing out those unused slots
- * to active clients avoids needless latency if the "fixed scheme"
- * would give unclaimed slots to an eager low-index client.
- */
-
-void crisv32_arbiter_deallocate_bandwidth(int client, int region)
-{
-   int i;
-   int total_assigned = 0;
-
-   requested_slots[region][client] = 0;
-   active_clients[region][client] = 0;
-
-   for (i = 0; i < NBR_OF_CLIENTS; i++)
-   total_assigned += requested_slots[region][i];
-
-   crisv32_arbiter_config(region, NBR_OF_SLOTS - total_assigned);
-}
-
 int crisv32_arbiter_watch(unsigned long start, unsigned long size,
  unsigned long clients, unsigned long accesses,
  watch_callback *cb)
-- 
1.7.10.4

--
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] ovl: Prevent rw remount when it should be ro mount

2015-01-01 Thread Seunghun Lee
Overlayfs should be mounted read-only when upper fs is r/o or nonexistend.
But now it can be remounted read-write and this can causes kernel panic.
So we should prevent read-write remount when the above situation.

Signed-off-by: Seunghun Lee 
---
 fs/overlayfs/super.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index 84f3144..8944651 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -522,10 +522,21 @@ static int ovl_show_options(struct seq_file *m, struct 
dentry *dentry)
return 0;
 }
 
+static int ovl_remount(struct super_block *sb, int *flags, char *data)
+{
+   struct ovl_fs *ufs = sb->s_fs_info;
+
+   if (!ufs->upper_mnt || (ufs->upper_mnt->mnt_sb->s_flags & MS_RDONLY))
+   *flags |= MS_RDONLY;
+
+   return 0;
+}
+
 static const struct super_operations ovl_super_operations = {
.put_super  = ovl_put_super,
.statfs = ovl_statfs,
.show_options   = ovl_show_options,
+   .remount_fs = ovl_remount,
 };
 
 enum {
-- 
2.1.3

--
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   >