24 Sep, 2016

1 commit

  • Check for watchdog_ops structures that are only stored in the ops field of
    a watchdog_device structure. This field is declared const, so watchdog_ops
    structures that have this property can be declared as const also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct watchdog_ops i@p = { ... };

    @ok@
    identifier r.i;
    struct watchdog_device e;
    position p;
    @@
    e.ops = &i@p;

    @bad@
    position p != {r.p,ok.p};
    identifier r.i;
    struct watchdog_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct watchdog_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Julia Lawall
     

20 Oct, 2014

1 commit


11 Jun, 2014

1 commit


10 Dec, 2013

1 commit


18 Nov, 2013

2 commits

  • I just can't find any value in MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR)
    and MODULE_ALIAS_MISCDEV(TEMP_MINOR) statements.

    Either the device is enumerated and the driver already has a module
    alias (e.g. PCI, USB etc.) that will get the right driver loaded
    automatically.

    Or the device is not enumerated and loading its driver will lead to
    more or less intrusive hardware poking. Such hardware poking should be
    limited to a bare minimum, so the user should really decide which
    drivers should be tried and in what order. Trying them all in
    arbitrary order can't do any good.

    On top of that, loading that many drivers at once bloats the kernel
    log. Also many drivers will stay loaded afterward, bloating the output
    of "lsmod" and wasting memory. Some modules (cs5535_mfgpt which gets
    loaded as a dependency) can't even be unloaded!

    If defining char-major-10-130 is needed then it should happen in
    user-space.

    Signed-off-by: Jean Delvare
    Acked-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Cc: Stephen Warren
    Cc: Mike Frysinger
    Cc: Wan ZongShun
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Cc: Zwane Mwaikambo
    Cc: Jim Cromie

    Jean Delvare
     
  • Added __user annotation to fix the following sparse warnings.
    Also, it makes 'kempld_prescaler' static because it is used
    only in this file.

    drivers/watchdog/kempld_wdt.c:70:11: warning: symbol 'kempld_prescaler' was not declared. Should it be static?
    drivers/watchdog/kempld_wdt.c:364:23: warning: incorrect type in initializer (different address spaces)
    drivers/watchdog/kempld_wdt.c:364:23: expected int const [noderef] *register __p
    drivers/watchdog/kempld_wdt.c:364:23: got int *

    Signed-off-by: Jingoo Han
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Jingoo Han
     

14 Oct, 2013

1 commit


01 Jul, 2013

1 commit