• Peter Huewe's avatar
    tpm: cleanup checkpatch warnings · 0a418269
    Peter Huewe authored
    before we rename the file it might be a good idea to cleanup the long
    persisting checkpatch warnings.
    Since everything is really trivial, splitting the patch up would only
    result in noise.
    
    For the interested reader - here the checkpatch warnings:
    (regrouped for easer readability)
    
    ERROR: trailing whitespace
    + * Specifications at www.trustedcomputinggroup.org^I $
    + * $
    +^I/* $
    +^I   parameters (RSA 12->bytes: keybit, #primes, expbit)  $
    
    WARNING: unnecessary whitespace before a quoted newline
    +			"invalid count value %x %zx \n", count, bufsiz);
    
    ERROR: do not use assignment in if condition
    +	if ((rc = chip->vendor.send(chip, (u8 *) buf, count)) < 0) {
    
    ERROR: space required after that ',' (ctx:VxV)
    +	len = tpm_transmit(chip,(u8 *) cmd, len);
     	                       ^
    
    ERROR: "foo * bar" should be "foo *bar"
    +ssize_t tpm_show_enabled(struct device * dev, struct device_attribute * attr,
    +ssize_t tpm_show_enabled(struct device * dev, struct device_attribute * attr,
    +ssize_t tpm_show_active(struct device * dev, struct device_attribute * attr,
    +ssize_t tpm_show_active(struct device * dev, struct device_attribute * attr,
    +ssize_t tpm_show_owned(struct device * dev, struct device_attribute * attr,
    +ssize_t tpm_show_owned(struct device * dev, struct device_attribute * attr,
    +ssize_t tpm_show_temp_deactivated(struct device * dev,
    +				struct device_attribute * attr, char *buf)
    
    WARNING: please, no space before tabs
    + * @chip_num: ^Itpm idx # or ANY$
    + * @res_buf: ^ITPM_PCR value$
    + * ^I^Isize of res_buf is 20 bytes (or NULL if you don't care)$
    + * @chip_num: ^Itpm idx # or AN&$
    + * @hash: ^Ihash value used to extend pcr value$
    
    ERROR: code indent should use tabs where possible
    +^I                                     TPM_ORD_CONTINUE_SELFTEST);$
    
    WARNING: line over 80 characters
    +static bool wait_for_tpm_stat_cond(struct tpm_chip *chip, u8 mask, bool check_cancel,
    
    ERROR: trailing whitespace
    + * Called from tpm_<specific>.c probe function only for devices $
    
    total: 16 errors, 7 warnings, 1554 lines checked
    Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
    0a418269
tpm.c 37.4 KB