qcacmn: Avoid compilation issue with kernel 4.19
There is a compilation issue if a variable is passed to kernel api DECLARE_HASHTABLE. TO resolve this issue, instead of passing a variable pass a constant to DECLARE_HASHTABLE. Change-Id: Ie9782af541bb34cc50f79060b0007dc73881e5f4 CRs-Fixed: 2386893
此提交包含在:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -38,7 +38,9 @@
|
||||
/**
|
||||
* qdf_ht_declare() - declare a new qdf_ht
|
||||
* @name: variable name of the hashtable to declare
|
||||
* @bits: number of hash bits to use; buckets=2^bits
|
||||
* @bits: number of hash bits to use; buckets=2^bits; Needs to be a compile
|
||||
* time constant
|
||||
*
|
||||
*/
|
||||
#define qdf_ht_declare(name, bits) __qdf_ht_declare(name, bits)
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -20,6 +20,9 @@
|
||||
#include "qdf_hashtable_test.h"
|
||||
#include "qdf_trace.h"
|
||||
|
||||
/* 16 buckets */
|
||||
#define QDF_HT_HASH_BITS 4
|
||||
|
||||
struct qdf_ht_test_item {
|
||||
struct qdf_ht_entry entry;
|
||||
uintptr_t key;
|
||||
@@ -27,12 +30,12 @@ struct qdf_ht_test_item {
|
||||
|
||||
static uint32_t qdf_ht_test_single(void)
|
||||
{
|
||||
const int bits = 4; /* 16 buckets */
|
||||
const int bits = QDF_HT_HASH_BITS;
|
||||
struct qdf_ht_test_item item = { .key = (uintptr_t)&bits };
|
||||
struct qdf_ht_test_item *cursor;
|
||||
int i, count;
|
||||
|
||||
qdf_ht_declare(ht, bits);
|
||||
qdf_ht_declare(ht, QDF_HT_HASH_BITS);
|
||||
|
||||
qdf_ht_init(ht);
|
||||
qdf_ht_add(ht, &item.entry, item.key);
|
||||
|
新增問題並參考
封鎖使用者