lkml.org 
[lkml]   [2007]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] drivers: PMC MSP71xx TWI driver
    Previous comments apply - please convert all this code to kernel coding style.

    There are many typecasts of void*, eg:

    > + struct pmcmsp_priv_data *p = (struct pmcmsp_priv_data*)data;

    Such casts are unneeded and give an undesirable decrease in typesafety - please
    remove them all.

    pmcmsp_priv_data.lock should be converted from semaphore to a mutex

    Convert u_intN_t -> uN throughout.

    Convert all symbol of the form getClockConfig to (in this case)
    get_clock_config.

    These:

    > +/* The default settings */
    > +const static struct pmctwi_clockcfg pmctwi_defclockcfg = {
    > + .standard = {
    > + .filter = 0x3,
    > + .clock = 0x1f,
    > + },
    > + .highspeed = {
    > + .filter = 0x3,
    > + .clock = 0x1f,
    > + },
    > +};
    > +
    > +const static struct pmctwi_cfg pmctwi_deftwicfg = {
    > + .arbf = 0x03,
    > + .nak = 0x03,
    > + .add10 = 0x00,
    > + .mst_code = 0x00,
    > + .arb = 0x01,
    > + .highspeed = 0x00,
    > +};

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

    \
     
     \ /
      Last update: 2007-03-05 11:23    [W:0.062 / U:60.664 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site