Hi Chen/Johan, On Thu, Mar 29, 2012 at 6:22 AM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote: > Hi Chen, > > On Wed, Mar 28, 2012, chen.ganir@xxxxxx wrote: >> + if (status != 0) { >> + DBG("value read failed: %s", >> + att_ecode2str(status)); > > Why is this split into two lines. The call can easily fit within 80 > chars with all of its parameters. Also, this should be error() and not > DBG(). > >> + if (!dec_read_resp(pdu, len, value, &vlen)) { >> + DBG("Protocol error\n"); > > This should be error() and the \n at the end should be removed. Just to complement: if using error(), be sure to use a more meaningful error message, because the source file and function name will not appear on the log in this case. E.g. "Could not read PNP ID value: %s" "ATT protocol error while reading PNP ID" Also, there is no need to add "\n" to DBG() or error(), they are added automatically. Regards, -- Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html