Merge branch 'for-6.20' into for-linus

This commit is contained in:
Petr Mladek
2026-02-11 10:14:35 +01:00
4 changed files with 18 additions and 14 deletions

View File

@@ -181,7 +181,6 @@ int seq_open_private(struct file *, const struct seq_operations *, int);
int seq_release_private(struct inode *, struct file *);
#ifdef CONFIG_BINARY_PRINTF
__printf(2, 0)
void seq_bprintf(struct seq_file *m, const char *f, const u32 *binary);
#endif

View File

@@ -336,8 +336,8 @@ int __sysfs_match_string(const char * const *array, size_t n, const char *s);
#define sysfs_match_string(_a, _s) __sysfs_match_string(_a, ARRAY_SIZE(_a), _s)
#ifdef CONFIG_BINARY_PRINTF
__printf(3, 0) int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args);
__printf(3, 0) int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf);
int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args);
int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf);
#endif
extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,

View File

@@ -1758,9 +1758,12 @@ bool nbcon_alloc(struct console *con)
/* Synchronize the kthread start. */
lockdep_assert_console_list_lock_held();
/* The write_thread() callback is mandatory. */
if (WARN_ON(!con->write_thread))
/* Check for mandatory nbcon callbacks. */
if (WARN_ON(!con->write_thread ||
!con->device_lock ||
!con->device_unlock)) {
return false;
}
rcuwait_init(&con->rcuwait);
init_irq_work(&con->irq_work, nbcon_irq_work);

View File

@@ -266,15 +266,17 @@ hash_pointer(struct kunit *kunittest)
KUNIT_EXPECT_MEMNEQ(kunittest, buf, PTR_STR, PTR_WIDTH);
}
static void
test_hashed(struct kunit *kunittest, const char *fmt, const void *p)
{
char buf[PLAIN_BUF_SIZE];
plain_hash_to_buffer(kunittest, p, buf, PLAIN_BUF_SIZE);
test(buf, fmt, p);
}
/*
* This is a macro so that the compiler can compare its arguments to the
* __printf() attribute on __test(). This cannot be a function with a __printf()
* attribute because GCC requires __printf() functions to be variadic.
*/
#define test_hashed(kunittest, fmt, p) \
do { \
char buf[PLAIN_BUF_SIZE]; \
plain_hash_to_buffer(kunittest, p, buf, PLAIN_BUF_SIZE); \
test(buf, fmt, p); \
} while (0)
/*
* NULL pointers aren't hashed.