tree:
https://github.com/0day-ci/linux/commits/UPDATE-20200817-172119/Allen-Pai...
head: 4172b013661c2d8c50fc252b3c85587bbfea0528
commit: 4172b013661c2d8c50fc252b3c85587bbfea0528 [1/1] firewire: ohci: convert tasklets to
use new tasklet_setup() API
config: x86_64-rhel-8.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout 4172b013661c2d8c50fc252b3c85587bbfea0528
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/firewire/ohci.c: In function 'ar_context_tasklet':
> drivers/firewire/ohci.c:926:27: error: implicit declaration of
function 'from_tasklet' [-Werror=implicit-function-declaration]
926 |
struct ar_context *ctx = from_tasklet(ctx, t, tasklet);
| ^~~~~~~~~~~~
> drivers/firewire/ohci.c:926:48: error: 'tasklet'
undeclared (first use in this function)
926 | struct ar_context *ctx =
from_tasklet(ctx, t, tasklet);
| ^~~~~~~
drivers/firewire/ohci.c:926:48: note: each undeclared identifier is reported only once
for each function it appears in
drivers/firewire/ohci.c: In function 'ar_context_init':
> drivers/firewire/ohci.c:980:2: error: implicit declaration of
function 'tasklet_setup' [-Werror=implicit-function-declaration]
980 |
tasklet_setup(&ctx->tasklet, ar_context_tasklet);
| ^~~~~~~~~~~~~
drivers/firewire/ohci.c: In function 'context_tasklet':
drivers/firewire/ohci.c:1054:45: error: 'tasklet' undeclared (first use in this
function)
1054 | struct context *ctx = from_tasklet(ctx, t, tasklet);
| ^~~~~~~
cc1: some warnings being treated as errors
#
https://github.com/0day-ci/linux/commit/4172b013661c2d8c50fc252b3c85587bb...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
UPDATE-20200817-172119/Allen-Pais/arch-um-convert-tasklets-to-use-new-tasklet_setup-API/20200817-171829
git checkout 4172b013661c2d8c50fc252b3c85587bbfea0528
vim +/from_tasklet +926 drivers/firewire/ohci.c
923
924 static void ar_context_tasklet(struct tasklet_struct *t)
925 {
926 struct ar_context *ctx = from_tasklet(ctx, t, tasklet);
927 unsigned int end_buffer_index, end_buffer_offset;
928 void *p, *end;
929
930 p = ctx->pointer;
931 if (!p)
932 return;
933
934 end_buffer_index = ar_search_last_active_buffer(ctx,
935 &end_buffer_offset);
936 ar_sync_buffers_for_cpu(ctx, end_buffer_index, end_buffer_offset);
937 end = ctx->buffer + end_buffer_index * PAGE_SIZE + end_buffer_offset;
938
939 if (end_buffer_index < ar_first_buffer_index(ctx)) {
940 /*
941 * The filled part of the overall buffer wraps around; handle
942 * all packets up to the buffer end here. If the last packet
943 * wraps around, its tail will be visible after the buffer end
944 * because the buffer start pages are mapped there again.
945 */
946 void *buffer_end = ctx->buffer + AR_BUFFERS * PAGE_SIZE;
947 p = handle_ar_packets(ctx, p, buffer_end);
948 if (p < buffer_end)
949 goto error;
950 /* adjust p to point back into the actual buffer */
951 p -= AR_BUFFERS * PAGE_SIZE;
952 }
953
954 p = handle_ar_packets(ctx, p, end);
955 if (p != end) {
956 if (p > end)
957 ar_context_abort(ctx, "inconsistent descriptor");
958 goto error;
959 }
960
961 ctx->pointer = p;
962 ar_recycle_buffers(ctx, end_buffer_index);
963
964 return;
965
966 error:
967 ctx->pointer = NULL;
968 }
969
970 static int ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci,
971 unsigned int descriptors_offset, u32 regs)
972 {
973 unsigned int i;
974 dma_addr_t dma_addr;
975 struct page *pages[AR_BUFFERS + AR_WRAPAROUND_PAGES];
976 struct descriptor *d;
977
978 ctx->regs = regs;
979 ctx->ohci = ohci;
980 tasklet_setup(&ctx->tasklet, ar_context_tasklet);
981
982 for (i = 0; i < AR_BUFFERS; i++) {
983 ctx->pages[i] = alloc_page(GFP_KERNEL | GFP_DMA32);
984 if (!ctx->pages[i])
985 goto out_of_memory;
986 dma_addr = dma_map_page(ohci->card.device, ctx->pages[i],
987 0, PAGE_SIZE, DMA_FROM_DEVICE);
988 if (dma_mapping_error(ohci->card.device, dma_addr)) {
989 __free_page(ctx->pages[i]);
990 ctx->pages[i] = NULL;
991 goto out_of_memory;
992 }
993 set_page_private(ctx->pages[i], dma_addr);
994 }
995
996 for (i = 0; i < AR_BUFFERS; i++)
997 pages[i] = ctx->pages[i];
998 for (i = 0; i < AR_WRAPAROUND_PAGES; i++)
999 pages[AR_BUFFERS + i] = ctx->pages[i];
1000 ctx->buffer = vmap(pages, ARRAY_SIZE(pages), VM_MAP, PAGE_KERNEL);
1001 if (!ctx->buffer)
1002 goto out_of_memory;
1003
1004 ctx->descriptors = ohci->misc_buffer + descriptors_offset;
1005 ctx->descriptors_bus = ohci->misc_buffer_bus + descriptors_offset;
1006
1007 for (i = 0; i < AR_BUFFERS; i++) {
1008 d = &ctx->descriptors[i];
1009 d->req_count = cpu_to_le16(PAGE_SIZE);
1010 d->control = cpu_to_le16(DESCRIPTOR_INPUT_MORE |
1011 DESCRIPTOR_STATUS |
1012 DESCRIPTOR_BRANCH_ALWAYS);
1013 d->data_address = cpu_to_le32(ar_buffer_bus(ctx, i));
1014 d->branch_address = cpu_to_le32(ctx->descriptors_bus +
1015 ar_next_buffer_index(i) * sizeof(struct descriptor));
1016 }
1017
1018 return 0;
1019
1020 out_of_memory:
1021 ar_context_release(ctx);
1022
1023 return -ENOMEM;
1024 }
1025
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org