提交 39b1bc4b 编写于 作者: V Ville Syrjälä

drm/i915: Rename block_size()/block_offset()

Give block_size()/block_offset() a "raw_" prefix since they
both operate on the "raw" (as in not duplicated) BDB block
contents.

What actually spurred this was a conflict between intel_bios.c
block_size() vs. block_size() from blkdev.h. That only
happened to me on a custom tree where we somehow manage to
include blkdev.h into intel_bios.c. But I think the rename
makes sense anyway to clarify the purpose of these functions.
Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220519140010.10600-1-ville.syrjala@linux.intel.comReviewed-by: NJani Nikula <jani.nikula@intel.com>
上级 08c59dde
...@@ -122,7 +122,7 @@ find_raw_section(const void *_bdb, enum bdb_block_id section_id) ...@@ -122,7 +122,7 @@ find_raw_section(const void *_bdb, enum bdb_block_id section_id)
* Offset from the start of BDB to the start of the * Offset from the start of BDB to the start of the
* block data (just past the block header). * block data (just past the block header).
*/ */
static u32 block_offset(const void *bdb, enum bdb_block_id section_id) static u32 raw_block_offset(const void *bdb, enum bdb_block_id section_id)
{ {
const void *block; const void *block;
...@@ -134,7 +134,7 @@ static u32 block_offset(const void *bdb, enum bdb_block_id section_id) ...@@ -134,7 +134,7 @@ static u32 block_offset(const void *bdb, enum bdb_block_id section_id)
} }
/* size of the block excluding the header */ /* size of the block excluding the header */
static u32 block_size(const void *bdb, enum bdb_block_id section_id) static u32 raw_block_size(const void *bdb, enum bdb_block_id section_id)
{ {
const void *block; const void *block;
...@@ -231,7 +231,7 @@ static bool validate_lfp_data_ptrs(const void *bdb, ...@@ -231,7 +231,7 @@ static bool validate_lfp_data_ptrs(const void *bdb,
int data_block_size, lfp_data_size; int data_block_size, lfp_data_size;
int i; int i;
data_block_size = block_size(bdb, BDB_LVDS_LFP_DATA); data_block_size = raw_block_size(bdb, BDB_LVDS_LFP_DATA);
if (data_block_size == 0) if (data_block_size == 0)
return false; return false;
...@@ -308,7 +308,7 @@ static bool fixup_lfp_data_ptrs(const void *bdb, void *ptrs_block) ...@@ -308,7 +308,7 @@ static bool fixup_lfp_data_ptrs(const void *bdb, void *ptrs_block)
u32 offset; u32 offset;
int i; int i;
offset = block_offset(bdb, BDB_LVDS_LFP_DATA); offset = raw_block_offset(bdb, BDB_LVDS_LFP_DATA);
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
if (ptrs->ptr[i].fp_timing.offset < offset || if (ptrs->ptr[i].fp_timing.offset < offset ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册