diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2020-11-12 01:07:02 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-12 01:07:03 +0300 |
| commit | 8ed1045bb828cd04326369cd66afeb48af2582ac (patch) | |
| tree | c31a5a9a0327ad11e198f872796e9b78148c832b | |
| parent | 70408949a35f1a31c327c69b6a187635cb0305fa (diff) | |
| parent | bf795af1d42a6e7711e39c4fc64f452cc83dde97 (diff) | |
| download | linux-8ed1045bb828cd04326369cd66afeb48af2582ac.tar.xz | |
Merge branch 'net-ipa-little-fixes'
Alex Elder says:
====================
net: ipa: little fixes
This series adds a few small fixes to the IPA code.
The first patch appeared in a different form in June, and got some
pushback from David because he felt a problem that can be caught at
build time *should* be caught at build time.
https://lore.kernel.org/netdev/20200610195332.2612233-1-elder@linaro.org/
I agree with that, but in this case the "problem" was never actually
a problem. There's a little more explanation on the patch, but
basically now we remove the BUILD_BUG_ON() call entirely.
The second deletes a line of code that isn't needed.
The third converts a warning message to be a debug, as requested by
Stephen Boyd.
And the last one just gets rid of an error message that would be
output after a different message had already reported a problem.
====================
Link: https://lore.kernel.org/r/20201109165635.5449-1-elder@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/ipa/gsi.c | 7 | ||||
| -rw-r--r-- | drivers/net/ipa/ipa_main.c | 6 | ||||
| -rw-r--r-- | drivers/net/ipa/ipa_mem.c | 8 |
3 files changed, 6 insertions, 15 deletions
diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 961a11d4fb27..3a5998a037da 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -1661,12 +1661,7 @@ static int gsi_modem_channel_alloc(struct gsi *gsi, u32 channel_id) static void gsi_modem_channel_halt(struct gsi *gsi, u32 channel_id) { - int ret; - - ret = gsi_generic_command(gsi, channel_id, GSI_GENERIC_HALT_CHANNEL); - if (ret) - dev_err(gsi->dev, "error %d halting modem channel %u\n", - ret, channel_id); + (void)gsi_generic_command(gsi, channel_id, GSI_GENERIC_HALT_CHANNEL); } /* Setup function for channels */ diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index a580cab794b1..bfe95a46acaf 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/drivers/net/ipa/ipa_main.c @@ -335,7 +335,6 @@ static void ipa_hardware_config(struct ipa *ipa) ipa_hardware_config_qsb(ipa); /* Configure aggregation granularity */ - val = ioread32(ipa->reg_virt + IPA_REG_COUNTER_CFG_OFFSET); granularity = ipa_aggr_granularity_val(IPA_AGGR_GRANULARITY); val = u32_encode_bits(granularity, AGGR_GRANULARITY); iowrite32(val, ipa->reg_virt + IPA_REG_COUNTER_CFG_OFFSET); @@ -680,9 +679,6 @@ static void ipa_validate_build(void) */ BUILD_BUG_ON(GSI_TLV_MAX > U8_MAX); - /* Exceeding 128 bytes makes the transaction pool *much* larger */ - BUILD_BUG_ON(sizeof(struct gsi_trans) > 128); - /* This is used as a divisor */ BUILD_BUG_ON(!IPA_AGGR_GRANULARITY); @@ -790,7 +786,7 @@ static int ipa_probe(struct platform_device *pdev) if (ret) goto err_mem_exit; - /* Result is a non-zero mask endpoints that support filtering */ + /* Result is a non-zero mask of endpoints that support filtering */ ipa->filter_map = ipa_endpoint_init(ipa, data->endpoint_count, data->endpoint_data); if (!ipa->filter_map) { diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c index ecfd1f91fce3..0cc3a3374caa 100644 --- a/drivers/net/ipa/ipa_mem.c +++ b/drivers/net/ipa/ipa_mem.c @@ -160,13 +160,13 @@ int ipa_mem_config(struct ipa *ipa) mem_size = 8 * u32_get_bits(val, SHARED_MEM_SIZE_FMASK); /* If the sizes don't match, issue a warning */ - if (ipa->mem_offset + mem_size > ipa->mem_size) { - dev_warn(dev, "ignoring larger reported memory size: 0x%08x\n", - mem_size); - } else if (ipa->mem_offset + mem_size < ipa->mem_size) { + if (ipa->mem_offset + mem_size < ipa->mem_size) { dev_warn(dev, "limiting IPA memory size to 0x%08x\n", mem_size); ipa->mem_size = mem_size; + } else if (ipa->mem_offset + mem_size > ipa->mem_size) { + dev_dbg(dev, "ignoring larger reported memory size: 0x%08x\n", + mem_size); } /* Prealloc DMA memory for zeroing regions */ |
