Re: [PATCH 012/196] nozomi driver

From: Jan Engelhardt
Date: Fri Jan 25 2008 - 03:47:21 EST



On Jan 24 2008 23:09, Greg Kroah-Hartman wrote:
>+/*
>+ * nozomi.c -- HSDPA driver Broadband Wireless Data Card - Globe Trotter
>+ *
>+ * Written by: Ulf Jakobsson,
>+ * Jan ïerfeldt,
^

Neither in ISO-8859-1 nor UTF-8 this position contains something meaningful.
Mind to update to UTF-8?

>+/*
>+ * CHANGELOG

Changelogs go into git, not files, at least that is what was mentioned
time and again.

>+#ifdef __BIG_ENDIAN
>+/* Big endian */
>+
>+struct toggles {
>+ unsigned enabled:5; /*
>+ * Toggle fields are valid if enabled is 0,
>+ * else A-channels must always be used.
>+ */
>+ unsigned diag_dl:1;
>+ unsigned mdm_dl:1;
>+ unsigned mdm_ul:1;
>+} __attribute__ ((packed));

Probably just me, unsigned int is a good bit more explicit.
The driver may also use a combined struct with
BIG_ENDIAN_BITFIELD/LITTLE_ENDIAN_BIGFIELD (see e.g. linux/ip.h).

>+/* Global variables */
>+static struct pci_device_id nozomi_pci_tbl[] = {
>+ {PCI_DEVICE(VENDOR1, DEVICE1)},
>+ {},
>+};

The macros are only used once, could just as well substitute them
by their real values.

>+/*
>+ * TODO:
>+ * -Optimize
>+ * -Rewrite cleaner
>+ */

>+/*
>+ * Handle donlink data, ports that are handled are modem and diagnostics
^

downlink

>+static DEVICE_ATTR(card_type, 0444, card_type_show, NULL);

While 0444 is probably never going to change its meaning, S_IRUGO comes
into mind.

>+/* just to discard single character writes */
>+static void ntty_put_char(struct tty_struct *tty, unsigned char c)
>+{
>+ /* FIXME !!! */
>+ DBG2("PUT CHAR Function: %c", c);
>+}

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