On Thu, Sep 01, 2016 at 12:39:46AM +0530, Nayna wrote: > >>+int read_log_of(struct tpm_chip *chip); > >>+#else > >>+static inline int read_log_of(struct tpm_chip *chip) > >>+{ > >>+ return -1; > >>+} > >>+#endif > > > >Though shouldn't these two be ERRNOs of some kind? -ENODEV? > > Sure.. > Was just trying to see possible errno. And here are some thoughts. > > > #define EPERM 1 /* Operation not permitted */ > #define ENODEV 19 /* No such device */
> Was thinking that since tpm device will still be present and its either ACPI > or OF way of accessing its properties, and one of them will return this > errno. So, assuming it is ACPI, that means no OF functions permitted. So, > how about using EPERM ? I'd choose ENODEV over EPERM, that is the usual way in the kernel to signal 'probe failed' Remember, which ever it is, it should not cause any messages to be printed. Jason ------------------------------------------------------------------------------ _______________________________________________ tpmdd-devel mailing list tpmdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tpmdd-devel