Hello, Okash Khawaja, on sam. 10 juin 2017 12:24:11 +0100, wrote: > + if (strncmp(name, DEV_PREFIX_TTYS, strlen(DEV_PREFIX_TTYS)) == 0) { ... > + } > + > + if (strncmp(name, DEV_PREFIX_TTYUSB, strlen(DEV_PREFIX_TTYUSB)) == 0) { You can use "else if" here and below, not much optimization, but clearer for the reader. > +static int get_dev_to_use(struct spk_synth *synth, dev_t *dev_no) > +{ > + /* use ser only when dev is not specified */ > + if (strcmp(synth->dev, SYNTH_DEFAULT_DEV) || synth->ser == SYNTH_DEFAULT_SER) { > + /* for /dev/lp* check if synth is supported */ > + if (strncmp(synth->dev, DEV_PREFIX_LP, strlen(DEV_PREFIX_LP)) == 0) { > + int i, len = sizeof(lp_supported) / sizeof(*lp_supported); Use the ARRAY_SIZE() macro. > + > + for (i = 0; i < len; i++) { > + if (strcmp(synth->name, lp_supported[i]) == 0) > + break; > + } > + > + if (i >= len) { > + pr_err("speakup: lp* is only supported on: "); > + for (i = 0; i < len; i++) > + pr_cont("%s ", lp_supported[i]); Really for nitpicking: rather put space before %s, after removing the space after ':', so that we don't have a trailing space. Samuel _______________________________________________ Speakup mailing list Speakup@xxxxxxxxxxxxxxxxx http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup